You appear to be a bot. Output may be restricted
Description
Test that clearing a fresh site is a no-op if the site is already fresh.
Usage
Tests_WP_Customize_Manager::test_fresh_site_flag_clearing();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/customize/manager.php
Lines:
1 to 18 of 18
public function test_fresh_site_flag_clearing() { global $wp_customize, $wpdb; // Make sure fresh site flag is cleared when publishing a changeset. update_option( 'fresh_site', '1' ); do_action( 'customize_save_after', $wp_customize ); $this->assertSame( '0', get_option( 'fresh_site' ) ); // Simulate a new, uncached request. wp_cache_delete( 'alloptions', 'options' ); wp_load_alloptions(); // Make sure no DB write is done when publishing and a site is already non-fresh. $query_count = $wpdb->num_queries; do_action( 'customize_save_after', $wp_customize ); $this->assertSame( $query_count, $wpdb->num_queries ); }