Example #1
0
 public function setUp()
 {
     parent::setUp();
     register_taxonomy('test-taxonomy', 'post');
     $this->editor_id = $this->factory->user->create(array('role' => 'editor'));
     $this->cat_id = $this->factory->term->create(array('taxonomy' => 'category', 'name' => 'cat-a'));
     $this->tag_id = $this->factory->term->create(array('taxonomy' => 'post_tag', 'name' => 'tag-b'));
     $this->tax_id = $this->factory->term->create(array('taxonomy' => 'test-taxonomy', 'name' => 'tax-c'));
     $this->post_id = $this->factory->post->create(array('post_title' => 'hello-world', 'post_author' => $this->editor_id, 'post_category' => array($this->cat_id), 'tax_input' => array('post_tag' => 'tag-b', 'test-taxonomy' => 'tax-c'), 'post_date' => '2015-03-14 12:34:56'));
     $this->page_id = $this->factory->post->create(array('post_title' => 'hello-page', 'post_type' => 'page'));
 }
Example #2
0
 public function setUp()
 {
     parent::setUp();
     Ad_Layers_DFP::instance()->get_ad_units_for_layer($this->ad_layer);
 }