Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Takshil-Kunadia committed Nov 14, 2024
1 parent 52fc462 commit 79b1b7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/php/test-class-amp-theme-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -1205,13 +1205,13 @@ public function test_filter_admin_bar_style_loader_tag( $setup_callback, $assert
}

/**
* Test filter_admin_bar_style_loader_tag when ->deps is not an array.
* Test filter_admin_bar_style_loader_tag when ->deps is an empty array.
*
* @covers \AMP_Theme_Support::filter_admin_bar_style_loader_tag()
*/
public function test_filter_admin_bar_style_loader_tag_non_array() {
public function test_filter_admin_bar_style_loader_tag_empty_array() {
wp_enqueue_style( 'admin-bar' );
$GLOBALS['wp_styles']->registered['admin-bar']->deps = null;
$GLOBALS['wp_styles']->registered['admin-bar']->deps = [];
$tag = '<link rel="stylesheet" id="dashicons-css" href="https://example.com/wp-includes/css/dashicons.css?ver=5.3.2" media="all" />'; // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet
$this->assertEquals( $tag, AMP_Theme_Support::filter_admin_bar_style_loader_tag( $tag, 'baz' ) );
}
Expand Down

0 comments on commit 79b1b7a

Please sign in to comment.