Ticket #31491: 31491.cache-flush.patch
| File 31491.cache-flush.patch, 2.7 KB (added by , 11 years ago) |
|---|
-
tests/phpunit/tests/option/siteOption.php
78 78 79 79 delete_site_option( $key ); 80 80 $this->assertTrue( update_site_option( $key, $value ) ); 81 wp_cache_flush(); // ensure we're getting the value from the DB81 $this->flush_cache(); // ensure we're getting the value from the DB 82 82 $this->assertEquals( $value, get_site_option( $key ) ); 83 83 } 84 84 -
tests/phpunit/tests/option/updateOption.php
25 25 } 26 26 27 27 global $wpdb; 28 wp_cache_flush();28 $this->flush_cache(); 29 29 update_option( 'test_update_option_default', 'value' ); 30 wp_cache_flush();30 $this->flush_cache(); 31 31 32 32 // Populate the alloptions cache, which includes autoload=yes options. 33 33 wp_load_alloptions(); … … 49 49 } 50 50 51 51 global $wpdb; 52 wp_cache_flush();52 $this->flush_cache(); 53 53 update_option( 'test_update_option_default', 'value', 'yes' ); 54 wp_cache_flush();54 $this->flush_cache(); 55 55 56 56 // Populate the alloptions cache, which includes autoload=yes options. 57 57 wp_load_alloptions(); … … 73 73 } 74 74 75 75 global $wpdb; 76 wp_cache_flush();76 $this->flush_cache(); 77 77 update_option( 'test_update_option_default', 'value', 'no' ); 78 wp_cache_flush();78 $this->flush_cache(); 79 79 80 80 // Populate the alloptions cache, which does not include autoload=no options. 81 81 wp_load_alloptions(); … … 98 98 } 99 99 100 100 global $wpdb; 101 wp_cache_flush();101 $this->flush_cache(); 102 102 update_option( 'test_update_option_default', 'value', false ); 103 wp_cache_flush();103 $this->flush_cache(); 104 104 105 105 // Populate the alloptions cache, which does not include autoload=no options. 106 106 wp_load_alloptions(); … … 127 127 $updated = update_option( 'foo', 'bar2', true ); 128 128 $this->assertTrue( $updated ); 129 129 130 wp_cache_flush();130 $this->flush_cache(); 131 131 132 132 // Populate the alloptions cache, which includes autoload=yes options. 133 133 wp_load_alloptions(); … … 152 152 $updated = update_option( 'foo', 'bar', false ); 153 153 $this->assertFalse( $updated ); 154 154 155 wp_cache_flush();155 $this->flush_cache(); 156 156 157 157 // Populate the alloptions cache, which includes autoload=yes options. 158 158 wp_load_alloptions(); … … 180 180 $updated = update_option( 'foo', 'bar2' ); 181 181 $this->assertTrue( $updated ); 182 182 183 wp_cache_flush();183 $this->flush_cache(); 184 184 185 185 // Populate the alloptions cache, which includes autoload=yes options. 186 186 wp_load_alloptions();
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)