Changeset 40346 for trunk/tests/phpunit/tests/multisite/site.php
- Timestamp:
- 03/28/2017 07:35:49 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/site.php
r39173 r40346 121 121 wp_update_network_counts(); 122 122 $this->assertEquals( 2, (int) get_blog_count() ); 123 } 124 125 public function test_site_caches_should_invalidate_when_invalidation_is_not_suspended() { 126 $site_id = self::factory()->blog->create(); 127 128 $details = get_site( $site_id ); 129 130 $suspend = wp_suspend_cache_invalidation( false ); 131 update_blog_details( $site_id, array( 'path' => '/a-non-random-test-path/' ) ); 132 $new_details = get_site( $site_id ); 133 wp_suspend_cache_invalidation( $suspend ); 134 135 $this->assertNotEquals( $details->path, $new_details->path ); 136 } 137 138 public function test_site_caches_should_not_invalidate_when_invalidation_is_suspended() { 139 $site_id = self::factory()->blog->create(); 140 141 $details = get_site( $site_id ); 142 143 $suspend = wp_suspend_cache_invalidation(); 144 update_blog_details( $site_id, array( 'path' => '/a-non-random-test-path/' ) ); 145 $new_details = get_site( $site_id ); 146 wp_suspend_cache_invalidation( $suspend ); 147 148 $this->assertEquals( $details->path, $new_details->path ); 123 149 } 124 150
Note: See TracChangeset
for help on using the changeset viewer.