remove
This commit is contained in:
parent
51dd891f34
commit
635ec15cab
@ -77,4 +77,9 @@ class PostFixtures {
|
||||
$this->create_categories($data['categories']);
|
||||
$this->create_posts($data['posts'], $data['categories']);
|
||||
}
|
||||
|
||||
function remove() {
|
||||
$this->remove_all_posts();
|
||||
$this->remove_all_categories();
|
||||
}
|
||||
}
|
||||
|
@ -198,4 +198,13 @@ class PostFixturesTest extends PHPUnit_Framework_TestCase {
|
||||
|
||||
$pf->create(array('posts' => 'posts', 'categories' => 'categories'));
|
||||
}
|
||||
|
||||
function testRemove() {
|
||||
$pf = $this->getMock('PostFixtures', array('remove_all_posts', 'remove_all_categories'));
|
||||
|
||||
$pf->expects($this->once())->method('remove_all_posts');
|
||||
$pf->expects($this->once())->method('remove_all_categories');
|
||||
|
||||
$pf->remove();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user