WP_UnitTest_Factory_For_Post::__construct PHP Method

__construct() public method

public __construct ( $factory = null )
    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' => 'post');
    }

Usage Example

 /**
  * 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');
 }
All Usage Examples Of WP_UnitTest_Factory_For_Post::__construct