__construct() public method

public __construct ( $factory = null )
 /**
  * Setup factory
  *
  * @since 2.2
  * @param null $factory
  */
 public function __construct($factory = null)
 {
     parent::__construct($factory);
     // set default
     $this->default_generation_definitions = array('post_status' => 'publish', 'post_title' => rand_str(), 'post_type' => 'shop_webhook');
 }
示例#2
0
 /**
  * @param GF_UnitTest_Factory $factory
  */
 function __construct($factory = null)
 {
     parent::__construct($factory);
     $form = $factory->form->create_and_get();
     $this->default_generation_definitions = array('post_status' => 'publish', 'post_title' => new WP_UnitTest_Generator_Sequence('GravityView title %s'), 'post_content' => new WP_UnitTest_Generator_Sequence('Post content %s'), 'post_excerpt' => new WP_UnitTest_Generator_Sequence('Post excerpt %s'), 'post_author' => '', 'post_type' => 'gravityview', 'form_id' => $form['id'], 'template_id' => 'preset_business_data');
 }
示例#3
0
 function __construct($post_type, $factory = null)
 {
     parent::__construct($factory);
     $this->default_generation_definitions['post_type'] = $post_type;
 }
示例#4
0
 function __construct($factory = null)
 {
     parent::__construct($factory);
     $this->default_generation_definitions = array('post_status' => 'publish', 'post_title' => new WP_UnitTest_Generator_Sequence('Post title %s'), 'post_content' => new WP_UnitTest_Generator_Sequence('Post content %s'), 'post_excerpt' => new WP_UnitTest_Generator_Sequence('Post excerpt %s'), 'post_type' => 'gistpen');
 }