/** * 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'); }
/** * @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'); }
function __construct($post_type, $factory = null) { parent::__construct($factory); $this->default_generation_definitions['post_type'] = $post_type; }
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'); }