Changeset 52010 for trunk/tests/phpunit/tests/theme/support.php
- Timestamp:
- 11/04/2021 03:22:47 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/theme/support.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme/support.php
r49354 r52010 6 6 class Tests_Theme_Support extends WP_UnitTestCase { 7 7 8 function test_the_basics() {8 public function test_the_basics() { 9 9 add_theme_support( 'automatic-feed-links' ); 10 10 $this->assertTrue( current_theme_supports( 'automatic-feed-links' ) ); … … 15 15 } 16 16 17 function test_admin_bar() {17 public function test_admin_bar() { 18 18 add_theme_support( 'admin-bar' ); 19 19 $this->assertTrue( current_theme_supports( 'admin-bar' ) ); … … 78 78 * @ticket 24932 79 79 */ 80 function test_supports_html5() {80 public function test_supports_html5() { 81 81 remove_theme_support( 'html5' ); 82 82 $this->assertFalse( current_theme_supports( 'html5' ) ); … … 95 95 * @expectedIncorrectUsage add_theme_support( 'html5' ) 96 96 */ 97 function test_supports_html5_subset() {97 public function test_supports_html5_subset() { 98 98 remove_theme_support( 'html5' ); 99 99 $this->assertFalse( current_theme_supports( 'html5' ) ); … … 126 126 * @expectedIncorrectUsage add_theme_support( 'html5' ) 127 127 */ 128 function test_supports_html5_invalid() {128 public function test_supports_html5_invalid() { 129 129 remove_theme_support( 'html5' ); 130 130 $this->assertFalse( add_theme_support( 'html5', 'comment-form' ) ); … … 138 138 * @expectedIncorrectUsage add_theme_support( 'post-formats' ) 139 139 */ 140 function test_supports_post_formats_doing_it_wrong() {140 public function test_supports_post_formats_doing_it_wrong() { 141 141 // The second parameter should be an array. 142 142 $this->assertFalse( add_theme_support( 'post-formats' ) ); 143 143 } 144 144 145 function supports_foobar( $yesno, $args, $feature ) {145 public function supports_foobar( $yesno, $args, $feature ) { 146 146 if ( $args[0] === $feature[0] ) { 147 147 return true; … … 150 150 } 151 151 152 function test_plugin_hook() {152 public function test_plugin_hook() { 153 153 $this->assertFalse( current_theme_supports( 'foobar' ) ); 154 154 add_theme_support( 'foobar' ); … … 168 168 * @ticket 26900 169 169 */ 170 function test_supports_menus() {170 public function test_supports_menus() { 171 171 // Start fresh. 172 172 foreach ( get_registered_nav_menus() as $location => $desc ) { … … 198 198 * @ticket 45125 199 199 */ 200 function test_responsive_embeds() {200 public function test_responsive_embeds() { 201 201 add_theme_support( 'responsive-embeds' ); 202 202 $this->assertTrue( current_theme_supports( 'responsive-embeds' ) );
Note: See TracChangeset
for help on using the changeset viewer.