Changeset 52010 for trunk/tests/phpunit/tests/option/themeMods.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/option/themeMods.php
r51524 r52010 6 6 class Tests_Option_Theme_Mods extends WP_UnitTestCase { 7 7 8 function test_theme_mod_default() {8 public function test_theme_mod_default() { 9 9 $this->assertFalse( get_theme_mod( 'non_existent' ) ); 10 10 } 11 11 12 function test_theme_mod_defined_default() {12 public function test_theme_mod_defined_default() { 13 13 $this->assertSame( 'default', get_theme_mod( 'non_existent', 'default' ) ); 14 14 } 15 15 16 function test_theme_mod_set() {16 public function test_theme_mod_set() { 17 17 $expected = 'value'; 18 18 set_theme_mod( 'test_name', $expected ); … … 23 23 * @ticket 51423 24 24 */ 25 function test_theme_mod_set_with_invalid_theme_mods_option() {25 public function test_theme_mod_set_with_invalid_theme_mods_option() { 26 26 $theme_slug = get_option( 'stylesheet' ); 27 27 update_option( 'theme_mods_' . $theme_slug, '' ); … … 29 29 } 30 30 31 function test_theme_mod_update() {31 public function test_theme_mod_update() { 32 32 set_theme_mod( 'test_update', 'first_value' ); 33 33 $expected = 'updated_value'; … … 36 36 } 37 37 38 function test_theme_mod_remove() {38 public function test_theme_mod_remove() { 39 39 set_theme_mod( 'test_remove', 'value' ); 40 40 remove_theme_mod( 'test_remove' ); … … 47 47 * @dataProvider data_theme_mod_default_value_with_percent_symbols 48 48 */ 49 function test_theme_mod_default_value_with_percent_symbols( $default, $expected ) {49 public function test_theme_mod_default_value_with_percent_symbols( $default, $expected ) { 50 50 $this->assertSame( $expected, get_theme_mod( 'test_name', $default ) ); 51 51 } 52 52 53 function data_theme_mod_default_value_with_percent_symbols() {53 public function data_theme_mod_default_value_with_percent_symbols() { 54 54 return array( 55 55 array(
Note: See TracChangeset
for help on using the changeset viewer.