Changeset 53494
- Timestamp:
- 06/13/2022 03:24:11 PM (22 months ago)
- Location:
- trunk/tests/phpunit/tests/option
- Files:
-
- 4 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/option/multisite.php
r52010 r53494 10 10 * @group multisite 11 11 */ 12 class Tests_ Multisite_Optionextends WP_UnitTestCase {12 class Tests_Option_Multisite extends WP_UnitTestCase { 13 13 14 14 public function test_from_same_site() { -
trunk/tests/phpunit/tests/option/option.php
r52010 r53494 225 225 } 226 226 227 /** 228 * Options should be autoloaded unless they were added with "no" or `false`. 229 * 230 * @ticket 31119 231 * @dataProvider data_option_autoloading 232 */ 233 public function test_option_autoloading( $name, $autoload_value, $expected ) { 234 global $wpdb; 235 $added = add_option( $name, 'Autoload test', '', $autoload_value ); 236 $this->assertTrue( $added ); 237 238 $actual = $wpdb->get_row( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s LIMIT 1", $name ) ); 239 $this->assertSame( $expected, $actual->autoload ); 240 } 241 242 /** 243 * Data provider. 244 * 245 * @return array 246 */ 227 247 public function data_option_autoloading() { 228 248 return array( … … 236 256 ); 237 257 } 238 /**239 * Options should be autoloaded unless they were added with "no" or `false`.240 *241 * @ticket 31119242 * @dataProvider data_option_autoloading243 */244 public function test_option_autoloading( $name, $autoload_value, $expected ) {245 global $wpdb;246 $added = add_option( $name, 'Autoload test', '', $autoload_value );247 $this->assertTrue( $added );248 249 $actual = $wpdb->get_row( $wpdb->prepare( "SELECT autoload FROM $wpdb->options WHERE option_name = %s LIMIT 1", $name ) );250 $this->assertSame( $expected, $actual->autoload );251 }252 258 } -
trunk/tests/phpunit/tests/option/sanitizeOption.php
r53493 r53494 4 4 * @group option 5 5 */ 6 class Tests_ Sanitize_Option extends WP_UnitTestCase {6 class Tests_Option_SanitizeOption extends WP_UnitTestCase { 7 7 8 8 /** -
trunk/tests/phpunit/tests/option/themeMods.php
r52010 r53494 4 4 * @group option 5 5 */ 6 class Tests_Option_Theme _Mods extends WP_UnitTestCase {6 class Tests_Option_ThemeMods extends WP_UnitTestCase { 7 7 8 8 public function test_theme_mod_default() { -
trunk/tests/phpunit/tests/option/userSettings.php
r52010 r53494 1 1 <?php 2 2 /** 3 * @group 123456 3 * @group option 4 * @group user 4 5 */ 5 class Tests_ User_Settings extends WP_UnitTestCase {6 class Tests_Option_UserSettings extends WP_UnitTestCase { 6 7 protected $user_id; 7 8 -
trunk/tests/phpunit/tests/option/wpLoadAlloptions.php
r53493 r53494 5 5 * @group option 6 6 */ 7 class Tests_Option_ WP_Load_Alloptions extends WP_UnitTestCase {7 class Tests_Option_wpLoadAlloptions extends WP_UnitTestCase { 8 8 protected $alloptions = null; 9 9
Note: See TracChangeset
for help on using the changeset viewer.