You appear to be a bot. Output may be restricted
Description
Usage
Tests_Option_UpdateOption::test_autoload_should_not_be_updated_for_existing_option_when_value_is_unchanged();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/option/updateOption.php
Lines:
1 to 19 of 19
public function test_autoload_should_not_be_updated_for_existing_option_when_value_is_unchanged() { global $wpdb; add_option( 'foo', 'bar', '', 'yes' ); $updated = update_option( 'foo', 'bar', false ); $this->assertFalse( $updated ); $this->flush_cache(); // Populate the alloptions cache, which includes autoload=yes options. wp_load_alloptions(); $before = $wpdb->num_queries; $value = get_option( 'foo' ); // 'foo' should still be autoload=yes, so we should see no additional querios. $this->assertSame( $before, $wpdb->num_queries ); $this->assertSame( $value, 'bar' ); }