create options

This commit is contained in:
John Bintz 2009-11-23 08:20:52 -05:00
parent 7fce0343e1
commit 1c298f4105
2 changed files with 6 additions and 4 deletions

View File

@ -188,6 +188,7 @@ class PostFixtures {
function create($data) { function create($data) {
$categories_by_slug = $this->create_categories($data['categories']); $categories_by_slug = $this->create_categories($data['categories']);
$this->create_posts($data['posts'], $categories_by_slug); $this->create_posts($data['posts'], $categories_by_slug);
$this->process_blog_options($data['options'], $categories_by_slug);
} }
function remove() { function remove() {

View File

@ -220,11 +220,12 @@ class PostFixturesTest extends PHPUnit_Framework_TestCase {
} }
function testCreate() { function testCreate() {
$pf = $this->getMock('PostFixtures', array('create_posts', 'create_categories')); $pf = $this->getMock('PostFixtures', array('create_posts', 'create_categories', 'process_blog_options'));
$pf->expects($this->once())->method('create_posts')->with('posts'); $pf->expects($this->once())->method('create_posts')->with('posts', 'processed');
$pf->expects($this->once())->method('create_categories')->with('categories'); $pf->expects($this->once())->method('create_categories')->with('categories')->will($this->returnValue('processed'));
$pf->expects($this->once())->method('process_blog_options')->with('options', 'processed');
$pf->create(array('posts' => 'posts', 'categories' => 'categories')); $pf->create(array('posts' => 'posts', 'categories' => 'categories', 'options' => 'options'));
} }
function testRemove() { function testRemove() {