This commit is contained in:
John Bintz 2009-11-22 19:07:13 -05:00
parent 51dd891f34
commit 635ec15cab
2 changed files with 14 additions and 0 deletions

View File

@ -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();
}
}

View File

@ -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();
}
}