This commit is contained in:
John Bintz 2009-11-22 19:05:20 -05:00
parent 054dd5a229
commit 51dd891f34
2 changed files with 13 additions and 0 deletions

View File

@ -72,4 +72,9 @@ class PostFixtures {
} }
return $post_ids_created; return $post_ids_created;
} }
function create($data) {
$this->create_categories($data['categories']);
$this->create_posts($data['posts'], $data['categories']);
}
} }

View File

@ -190,4 +190,12 @@ class PostFixturesTest extends PHPUnit_Framework_TestCase {
} }
} }
} }
function testCreate() {
$pf = $this->getMock('PostFixtures', array('create_posts', 'create_categories'));
$pf->expects($this->once())->method('create_posts')->with('posts');
$pf->expects($this->once())->method('create_categories')->with('categories');
$pf->create(array('posts' => 'posts', 'categories' => 'categories'));
}
} }