Skip to content

Commit

Permalink
Use HTML_Tag_Processor in test_remove_frameless_preview_messenger_cha…
Browse files Browse the repository at this point in the history
…nnel

Co-Authored-By: Dennis Snell <dennis.snell@automattic.com>
  • Loading branch information
westonruter and dmsnell committed Sep 26, 2023
1 parent 9e0c1f5 commit 2b764e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/phpunit/tests/customize/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3135,8 +3135,8 @@ public function test_remove_frameless_preview_messenger_channel() {
$manager = new WP_Customize_Manager( array( 'messenger_channel' => 'preview-0' ) );
ob_start();
$manager->remove_frameless_preview_messenger_channel();
$output = ob_get_clean();
$this->assertStringContainsString( '<script', $output );
$processor = new WP_HTML_Tag_Processor( ob_get_clean() );
$this->assertTrue( $processor->next_tag( 'script' ), 'Failed to find expected SCRIPT element in output.' );
}

/**
Expand Down

0 comments on commit 2b764e6

Please sign in to comment.