- Timestamp:
- 04/03/2024 09:29:13 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/option/wpSetOptionAutoload.php
r56508 r57920 23 23 24 24 $this->assertTrue( wp_set_option_autoload( $option, 'yes' ), 'Function did not succeed' ); 25 $this->assertSame( ' yes', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' );25 $this->assertSame( 'on', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' ); 26 26 $this->assertFalse( wp_cache_get( $option, 'options' ), 'Option not deleted from individual cache' ); 27 27 $this->assertFalse( wp_cache_get( 'alloptions', 'options' ), 'Alloptions cache not cleared' ); … … 42 42 43 43 $this->assertTrue( wp_set_option_autoload( $option, 'no' ), 'Function did not succeed' ); 44 $this->assertSame( ' no', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' );44 $this->assertSame( 'off', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' ); 45 45 $this->assertArrayNotHasKey( $option, wp_cache_get( 'alloptions', 'options' ), 'Option not deleted from alloptions cache' ); 46 46 } … … 60 60 61 61 $this->assertFalse( wp_set_option_autoload( $option, 'yes' ), 'Function did unexpectedly succeed' ); 62 $this->assertSame( ' yes', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value unexpectedly updated in database' );62 $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 63 } 64 64 … … 93 93 94 94 $this->assertTrue( wp_set_option_autoload( $option, true ), 'Function did not succeed' ); 95 $this->assertSame( ' yes', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' );95 $this->assertSame( 'on', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' ); 96 96 } 97 97 … … 110 110 111 111 $this->assertTrue( wp_set_option_autoload( $option, false ), 'Function did not succeed' ); 112 $this->assertSame( ' no', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' );112 $this->assertSame( 'off', $wpdb->get_var( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s", $option ) ), 'Option autoload value not updated in database' ); 113 113 } 114 114 }
Note: See TracChangeset
for help on using the changeset viewer.