diff --git a/classes/PostFixtures.inc b/classes/PostFixtures.inc index 75172fc..ed4cdfa 100644 --- a/classes/PostFixtures.inc +++ b/classes/PostFixtures.inc @@ -188,6 +188,7 @@ class PostFixtures { function create($data) { $categories_by_slug = $this->create_categories($data['categories']); $this->create_posts($data['posts'], $categories_by_slug); + $this->process_blog_options($data['options'], $categories_by_slug); } function remove() { diff --git a/test/PostFixturesTest.php b/test/PostFixturesTest.php index c3afd1a..c07c061 100644 --- a/test/PostFixturesTest.php +++ b/test/PostFixturesTest.php @@ -220,11 +220,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 = $this->getMock('PostFixtures', array('create_posts', 'create_categories', 'process_blog_options')); + $pf->expects($this->once())->method('create_posts')->with('posts', 'processed'); + $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() {