Changeset 37261
- Timestamp:
- 04/20/2016 03:30:40 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/canonical/category.php
r37260 r37261 10 10 public static $cats = array(); 11 11 12 public static function setUpBeforeClass() {12 public static function wpSetUpBeforeClass( $factory ) { 13 13 14 self::$posts[0] = self::factory()->post->create( array( 'post_name' => 'post0' ) );15 self::$posts[1] = self::factory()->post->create( array( 'post_name' => 'post1' ) );16 self::$cats[0] = self::factory()->category->create( array( 'slug' => 'cat0' ) );17 self::$cats[1] = self::factory()->category->create( array( 'slug' => 'cat1' ) );18 self::$cats[2] = self::factory()->category->create( array( 'slug' => 'cat2' ) );14 self::$posts[0] = $factory->post->create( array( 'post_name' => 'post0' ) ); 15 self::$posts[1] = $factory->post->create( array( 'post_name' => 'post1' ) ); 16 self::$cats[0] = $factory->category->create( array( 'slug' => 'cat0' ) ); 17 self::$cats[1] = $factory->category->create( array( 'slug' => 'cat1' ) ); 18 self::$cats[2] = $factory->category->create( array( 'slug' => 'cat2' ) ); 19 19 20 20 wp_set_post_categories( self::$posts[0], self::$cats[2] ); … … 23 23 } 24 24 25 public static function tearDownAfterClass() {25 public static function wpTearDownAfterClass() { 26 26 foreach ( self::$posts as $post_id ) { 27 27 wp_delete_post( $post_id, true );
Note: See TracChangeset
for help on using the changeset viewer.