- Timestamp:
- 08/28/2024 04:39:30 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/option/wpSetOptionAutoload.php
r57920 r58945 11 11 /** 12 12 * Tests that setting an option's autoload value to 'yes' works as expected. 13 * 14 * The values 'yes' and 'no' are only supported for backward compatibility. 13 15 * 14 16 * @ticket 58964 … … 30 32 /** 31 33 * Tests that setting an option's autoload value to 'no' works as expected. 34 * 35 * The values 'yes' and 'no' are only supported for backward compatibility. 32 36 * 33 37 * @ticket 58964 … … 57 61 $value = 'value'; 58 62 59 add_option( $option, $value, '', 'yes');63 add_option( $option, $value, '', true ); 60 64 61 $this->assertFalse( wp_set_option_autoload( $option, 'yes'), 'Function did unexpectedly succeed' );65 $this->assertFalse( wp_set_option_autoload( $option, true ), 'Function did unexpectedly succeed' ); 62 66 $this->assertSame( 'on', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value unexpectedly updated in database' ); 63 67 } … … 73 77 $option = 'test_option'; 74 78 75 $this->assertFalse( wp_set_option_autoload( $option, 'yes'), 'Function did unexpectedly succeed' );79 $this->assertFalse( wp_set_option_autoload( $option, true ), 'Function did unexpectedly succeed' ); 76 80 $this->assertNull( $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Missing option autoload value was set in database' ); 77 81 $this->assertArrayNotHasKey( $option, wp_cache_get( 'alloptions', 'options' ), 'Missing option found in alloptions cache' );
Note: See TracChangeset
for help on using the changeset viewer.