Changeset 52010 for trunk/tests/phpunit/tests/dependencies/styles.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/dependencies/styles.php
r51568 r52010 13 13 private $old_wp_scripts; 14 14 15 function set_up() {15 public function set_up() { 16 16 parent::set_up(); 17 17 … … 38 38 } 39 39 40 function tear_down() {40 public function tear_down() { 41 41 $GLOBALS['wp_styles'] = $this->old_wp_styles; 42 42 $GLOBALS['wp_scripts'] = $this->old_wp_scripts; … … 57 57 * @ticket 11315 58 58 */ 59 function test_wp_enqueue_style() {59 public function test_wp_enqueue_style() { 60 60 wp_enqueue_style( 'no-deps-no-version', 'example.com' ); 61 61 wp_enqueue_style( 'no-deps-version', 'example.com', array(), 1.2 ); … … 78 78 * @ticket 42804 79 79 */ 80 function test_wp_enqueue_style_with_html5_support_does_not_contain_type_attribute() {80 public function test_wp_enqueue_style_with_html5_support_does_not_contain_type_attribute() { 81 81 add_theme_support( 'html5', array( 'style' ) ); 82 82 … … 286 286 * @ticket 31126 287 287 */ 288 function test_wp_register_style() {288 public function test_wp_register_style() { 289 289 $this->assertTrue( wp_register_style( 'duplicate-handler', 'http://example.com' ) ); 290 290 $this->assertFalse( wp_register_style( 'duplicate-handler', 'http://example.com' ) ); … … 294 294 * @ticket 35229 295 295 */ 296 function test_wp_add_inline_style_for_handle_without_source() {296 public function test_wp_add_inline_style_for_handle_without_source() { 297 297 $style = 'a { color: blue; }'; 298 298 … … 317 317 * @dataProvider data_styles_with_media 318 318 */ 319 function test_wp_enqueue_style_with_media( $expected, $media ) {319 public function test_wp_enqueue_style_with_media( $expected, $media ) { 320 320 wp_enqueue_style( 'handle', 'http://example.com', array(), 1, $media ); 321 321 $this->assertStringContainsString( $expected, get_echo( 'wp_print_styles' ) ); 322 322 } 323 323 324 function data_styles_with_media() {324 public function data_styles_with_media() { 325 325 return array( 326 326 array( … … 358 358 * @covers ::wp_enqueue_style 359 359 */ 360 function test_block_styles_for_editing_without_theme_support() {360 public function test_block_styles_for_editing_without_theme_support() { 361 361 // Confirm we are without theme support by default. 362 362 $this->assertFalse( current_theme_supports( 'wp-block-styles' ) ); … … 376 376 * @covers ::wp_common_block_scripts_and_styles 377 377 */ 378 function test_block_styles_for_editing_with_theme_support() {378 public function test_block_styles_for_editing_with_theme_support() { 379 379 add_theme_support( 'wp-block-styles' ); 380 380 … … 394 394 * @covers ::wp_enqueue_style 395 395 */ 396 function test_no_block_styles_for_viewing_without_theme_support() {396 public function test_no_block_styles_for_viewing_without_theme_support() { 397 397 // Confirm we are without theme support by default. 398 398 $this->assertFalse( current_theme_supports( 'wp-block-styles' ) ); … … 412 412 * @covers ::wp_common_block_scripts_and_styles 413 413 */ 414 function test_block_styles_for_viewing_with_theme_support() {414 public function test_block_styles_for_viewing_with_theme_support() { 415 415 add_theme_support( 'wp-block-styles' ); 416 416 … … 429 429 * @covers ::wp_default_styles 430 430 */ 431 function test_block_styles_for_viewing_without_split_styles() {431 public function test_block_styles_for_viewing_without_split_styles() { 432 432 add_filter( 'should_load_separate_core_block_assets', '__return_false' ); 433 433 wp_default_styles( $GLOBALS['wp_styles'] ); … … 446 446 * @covers ::wp_default_styles 447 447 */ 448 function test_block_styles_for_viewing_with_split_styles() {448 public function test_block_styles_for_viewing_with_split_styles() { 449 449 add_filter( 'should_load_separate_core_block_assets', '__return_true' ); 450 450 wp_default_styles( $GLOBALS['wp_styles'] );
Note: See TracChangeset
for help on using the changeset viewer.