Changeset 36409 for trunk/tests/phpunit/includes/factory.php
- Timestamp:
- 01/27/2016 03:26:15 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/factory.php
r36347 r36409 11 11 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-generator-sequence.php' ); 12 12 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory-callback-after-create.php' ); 13 14 class WP_UnitTest_Factory { 15 16 /** 17 * @var WP_UnitTest_Factory_For_Post 18 */ 19 public $post; 20 21 /** 22 * @var WP_UnitTest_Factory_For_Attachment 23 */ 24 public $attachment; 25 26 /** 27 * @var WP_UnitTest_Factory_For_Comment 28 */ 29 public $comment; 30 31 /** 32 * @var WP_UnitTest_Factory_For_User 33 */ 34 public $user; 35 36 /** 37 * @var WP_UnitTest_Factory_For_Term 38 */ 39 public $term; 40 41 /** 42 * @var WP_UnitTest_Factory_For_Term 43 */ 44 public $category; 45 46 /** 47 * @var WP_UnitTest_Factory_For_Term 48 */ 49 public $tag; 50 51 /** 52 * @var WP_UnitTest_Factory_For_Blog 53 */ 54 public $blog; 55 56 /** 57 * @var WP_UnitTest_Factory_For_Network 58 */ 59 public $network; 60 61 function __construct() { 62 $this->post = new WP_UnitTest_Factory_For_Post( $this ); 63 $this->attachment = new WP_UnitTest_Factory_For_Attachment( $this ); 64 $this->comment = new WP_UnitTest_Factory_For_Comment( $this ); 65 $this->user = new WP_UnitTest_Factory_For_User( $this ); 66 $this->term = new WP_UnitTest_Factory_For_Term( $this ); 67 $this->category = new WP_UnitTest_Factory_For_Term( $this, 'category' ); 68 $this->tag = new WP_UnitTest_Factory_For_Term( $this, 'post_tag' ); 69 if ( is_multisite() ) { 70 $this->blog = new WP_UnitTest_Factory_For_Blog( $this ); 71 $this->network = new WP_UnitTest_Factory_For_Network( $this ); 72 } 73 } 74 } 13 require_once( dirname( __FILE__ ) . '/factory/class-wp-unittest-factory.php' );
Note: See TracChangeset
for help on using the changeset viewer.