You appear to be a bot. Output may be restricted
Description
Usage
Tests_Option_UpdateOption::test_should_set_autoload_no_for_nonexistent_option_when_autoload_param_is_no();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/option/updateOption.php
Lines:
1 to 18 of 18
public function test_should_set_autoload_no_for_nonexistent_option_when_autoload_param_is_no() { global $wpdb; $this->flush_cache(); update_option( 'test_update_option_default', 'value', 'no' ); $this->flush_cache(); // Populate the alloptions cache, which does not include autoload=no options. wp_load_alloptions(); $before = $wpdb->num_queries; $value = get_option( 'test_update_option_default' ); $after = $wpdb->num_queries; // Database has been hit. $this->assertSame( $before + 1, $after ); $this->assertSame( $value, 'value' ); }