Changeset 35242 for trunk/tests/phpunit/tests/adminbar.php
- Timestamp:
- 10/17/2015 06:02:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/adminbar.php
r35225 r35242 16 16 */ 17 17 function test_content_post_type() { 18 wp_set_current_user( self:: $factory->user->create( array( 'role' => 'editor' ) ) );18 wp_set_current_user( self::factory()->user->create( array( 'role' => 'editor' ) ) ); 19 19 20 20 register_post_type( 'content', array( 'show_in_admin_bar' => true ) ); … … 35 35 */ 36 36 function test_merging_existing_meta_values() { 37 wp_set_current_user( self:: $factory->user->create( array( 'role' => 'editor' ) ) );37 wp_set_current_user( self::factory()->user->create( array( 'role' => 'editor' ) ) ); 38 38 39 39 $admin_bar = new WP_Admin_Bar; … … 63 63 } 64 64 65 $nobody = self:: $factory->user->create( array( 'role' => '' ) );65 $nobody = self::factory()->user->create( array( 'role' => '' ) ); 66 66 $this->assertFalse( user_can( $nobody, 'read' ) ); 67 67 … … 93 93 } 94 94 95 $editor = self:: $factory->user->create( array( 'role' => 'editor' ) );95 $editor = self::factory()->user->create( array( 'role' => 'editor' ) ); 96 96 $this->assertTrue( user_can( $editor, 'read' ) ); 97 97 … … 126 126 } 127 127 128 $admin = self:: $factory->user->create( array( 'role' => 'administrator' ) );129 $editor = self:: $factory->user->create( array( 'role' => 'editor' ) );128 $admin = self::factory()->user->create( array( 'role' => 'administrator' ) ); 129 $editor = self::factory()->user->create( array( 'role' => 'editor' ) ); 130 130 131 131 $this->assertTrue( user_can( $admin, 'read' ) ); 132 132 $this->assertTrue( user_can( $editor, 'read' ) ); 133 133 134 $new_blog_id = self:: $factory->blog->create( array(134 $new_blog_id = self::factory()->blog->create( array( 135 135 'user_id' => $admin, 136 136 ) ); … … 180 180 } 181 181 182 $admin = self:: $factory->user->create( array( 'role' => 'administrator' ) );183 $nobody = self:: $factory->user->create( array( 'role' => '' ) );182 $admin = self::factory()->user->create( array( 'role' => 'administrator' ) ); 183 $nobody = self::factory()->user->create( array( 'role' => '' ) ); 184 184 185 185 $this->assertTrue( user_can( $admin, 'read' ) ); 186 186 $this->assertFalse( user_can( $nobody, 'read' ) ); 187 187 188 $new_blog_id = self:: $factory->blog->create( array(188 $new_blog_id = self::factory()->blog->create( array( 189 189 'user_id' => $admin, 190 190 ) );
Note: See TracChangeset
for help on using the changeset viewer.