Changeset 47122 for trunk/tests/phpunit/tests/multisite/site.php
- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/multisite/site.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/site.php
r47013 r47122 145 145 $prefix = $wpdb->get_blog_prefix( $blog_id ); 146 146 147 // $get_all = false, only retrieve details from the blogs table 147 // $get_all = false, only retrieve details from the blogs table. 148 148 $details = get_blog_details( $blog_id, false ); 149 149 … … 153 153 $this->assertEquals( $details, wp_cache_get( $blog_id . 'short', 'blog-details' ) ); 154 154 155 // get_blogaddress_by_name() 155 // get_blogaddress_by_name(). 156 156 $this->assertEquals( 'http://' . $details->domain . $details->path, get_blogaddress_by_name( trim( $details->path, '/' ) ) ); 157 157 158 // These are empty until get_blog_details() is called with $get_all = true 158 // These are empty until get_blog_details() is called with $get_all = true. 159 159 $this->assertEquals( false, wp_cache_get( $blog_id, 'blog-details' ) ); 160 160 $this->assertEquals( false, wp_cache_get( $key, 'blog-lookup' ) ); 161 161 162 // $get_all = true, populate the full blog-details cache and the blog slug lookup cache 162 // $get_all = true, populate the full blog-details cache and the blog slug lookup cache. 163 163 $details = get_blog_details( $blog_id, true ); 164 164 $this->assertEquals( $details, wp_cache_get( $blog_id, 'blog-details' ) ); … … 188 188 } 189 189 190 // update the blog count cache to use get_blog_count()190 // Update the blog count cache to use get_blog_count(). 191 191 wp_update_network_counts(); 192 192 $this->assertEquals( 2, (int) get_blog_count() ); … … 351 351 wpmu_delete_blog( $blog_id, false ); 352 352 353 // update the blog count cache to use get_blog_count()353 // Update the blog count cache to use get_blog_count(). 354 354 wp_update_network_counts(); 355 355 $this->assertEquals( 1, get_blog_count() ); … … 365 365 wpmu_delete_blog( $blog_id, true ); 366 366 367 // update the blog count cache to use get_blog_count()367 // Update the blog count cache to use get_blog_count(). 368 368 wp_update_network_counts(); 369 369 $this->assertEquals( 1, get_blog_count() ); … … 406 406 wpmu_update_blogs_date(); 407 407 408 // compare the update time with the current time, allow delta < 2408 // Compare the update time with the current time, allow delta < 2. 409 409 $blog = get_site( get_current_blog_id() ); 410 410 $current_time = time(); … … 920 920 remove_filter( 'domain_exists', array( $this, '_domain_exists_cb' ), 10, 4 ); 921 921 922 // Make sure the same result is returned with or without a trailing slash 922 // Make sure the same result is returned with or without a trailing slash. 923 923 $this->assertEquals( $exists1, $exists2 ); 924 924 } … … 2355 2355 */ 2356 2356 public function populate_options_callback() { 2357 // Cache blog details 2357 // Cache blog details. 2358 2358 $blog_id = get_current_blog_id(); 2359 2359 get_blog_details( $blog_id ); 2360 2360 get_site( $blog_id )->siteurl; 2361 // Set siteurl 2361 // Set siteurl. 2362 2362 update_option( 'siteurl', 'http://testsite1.example.org/test' ); 2363 2363 } … … 2421 2421 protected function _get_next_site_id() { 2422 2422 global $wpdb; 2423 // create an entry2423 // Create an entry. 2424 2424 static::factory()->blog->create(); 2425 // get the ID after it2425 // Get the ID after it. 2426 2426 return (int) $wpdb->get_var( 'SELECT blog_id FROM ' . $wpdb->blogs . ' ORDER BY blog_ID DESC LIMIT 1' ) + 1; 2427 2427 } … … 2439 2439 array(), 2440 2440 array( 2441 'public' => 0, // `public` is one of the default s metas in `wpmu_create_blog' function prior WordPress 5.1.02442 'WPLANG' => 'en_US', // WPLANG is another default meta in `wpmu_create_blog ` function priorWordPress 5.1.0.2441 'public' => 0, // `public` is one of the default metas in `wpmu_create_blog()' function prior to WordPress 5.1.0. 2442 'WPLANG' => 'en_US', // WPLANG is another default meta in `wpmu_create_blog()` function prior to WordPress 5.1.0. 2443 2443 ), 2444 2444 ),
Note: See TracChangeset
for help on using the changeset viewer.