Changeset 35225 for trunk/tests/phpunit/tests/multisite/network.php
- Timestamp:
- 10/16/2015 09:04:12 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/multisite/network.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/network.php
r34172 r35225 38 38 */ 39 39 function test_get_main_network_id_two_networks() { 40 $this->factory->network->create();40 self::$factory->network->create(); 41 41 42 42 $this->assertEquals( 1, get_main_network_id() ); … … 50 50 global $current_site; 51 51 52 $id = $this->factory->network->create();52 $id = self::$factory->network->create(); 53 53 54 54 $current_site->id = (int) $id; … … 66 66 function test_get_main_network_id_after_network_delete() { 67 67 global $wpdb, $current_site; 68 $id = $this->factory->network->create();68 $id = self::$factory->network->create(); 69 69 70 70 $current_site->id = (int) $id; … … 91 91 // false for large networks by default 92 92 add_filter( 'enable_live_network_counts', '__return_false' ); 93 $this->factory->blog->create_many( 4 );93 self::$factory->blog->create_many( 4 ); 94 94 95 95 // count only updated when cron runs, so unchanged … … 97 97 98 98 add_filter( 'enable_live_network_counts', '__return_true' ); 99 $site_ids = $this->factory->blog->create_many( 4 );99 $site_ids = self::$factory->blog->create_many( 4 ); 100 100 101 101 $this->assertEquals( $site_count_start + 9, (int) get_blog_count() ); … … 212 212 // Only false for large networks as of 3.7 213 213 add_filter( 'enable_live_network_counts', '__return_false' ); 214 $this->factory->user->create( array( 'role' => 'administrator' ) );214 self::$factory->user->create( array( 'role' => 'administrator' ) ); 215 215 216 216 $count = get_user_count(); // No change, cache not refreshed … … 241 241 $this->assertEquals( 1, $dashboard_blog->blog_id ); 242 242 243 $user_id = $this->factory->user->create( array( 'role' => 'administrator' ) );244 $blog_id = $this->factory->blog->create( array( 'user_id' => $user_id ) );243 $user_id = self::$factory->user->create( array( 'role' => 'administrator' ) ); 244 $blog_id = self::$factory->blog->create( array( 'user_id' => $user_id ) ); 245 245 $this->assertInternalType( 'int', $blog_id ); 246 246
Note: See TracChangeset
for help on using the changeset viewer.