create options
This commit is contained in:
parent
7fce0343e1
commit
1c298f4105
@ -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() {
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user