Changeset 56796 for trunk/tests/phpunit/tests/option/option.php
- Timestamp:
- 10/06/2023 04:31:22 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/option/option.php
r56788 r56796 778 778 $this->assertSame( 10, has_filter( 'pre_option_foo', '__return_zero' ) ); 779 779 } 780 781 /** 782 * Tests that calling update_option() with changed autoload from 'no' to 'yes' updates the cache correctly. 783 * 784 * This ensures that no stale data is served in case the option is deleted after. 785 * 786 * @ticket 51352 787 * 788 * @covers ::update_option 789 */ 790 public function test_update_option_with_autoload_change_no_to_yes() { 791 add_option( 'foo', 'value1', '', 'no' ); 792 update_option( 'foo', 'value2', 'yes' ); 793 delete_option( 'foo' ); 794 $this->assertFalse( get_option( 'foo' ) ); 795 } 796 797 /** 798 * Tests that calling update_option() with changed autoload from 'yes' to 'no' updates the cache correctly. 799 * 800 * This ensures that no stale data is served in case the option is deleted after. 801 * 802 * @ticket 51352 803 * 804 * @covers ::update_option 805 */ 806 public function test_update_option_with_autoload_change_yes_to_no() { 807 add_option( 'foo', 'value1', '', 'yes' ); 808 update_option( 'foo', 'value2', 'no' ); 809 delete_option( 'foo' ); 810 $this->assertFalse( get_option( 'foo' ) ); 811 } 780 812 }
Note: See TracChangeset
for help on using the changeset viewer.