Skip to content

Commit

Permalink
udpate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
remyperona committed Oct 29, 2024
1 parent 566e4f3 commit 7947e17
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class="notice notice-warning"><p><strong>RocketCDN:</strong> You are almost done. <a href="admin_url">Add your API key</a> to deliver your content at the speed of light!</p></div>
<div class="notice notice-warning"><p><strong>RocketCDN:</strong> You are almost done. <a href="http://example.org/wp-admin/options-general.php?page=rocketcdn">Add your API key</a> to deliver your content at the speed of light!</p></div>
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public function testShouldMaybeDisplayNotice( $config, $expected ) {
do_action( 'admin_notices' );

if ( $expected['contains'] ) {
$this->assertContains( ob_get_contents(), $expected );
$this->assertStringContainsString( ob_get_contents(), $expected['html'] );
} else {
$this->assertNotContains( ob_get_contents(), $expected );
$this->assertStringNotContainsString( ob_get_contents(), $expected['html'] );
}
ob_end_clean();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public function testShouldMaybeDisplayNotice( $config, $expected ) {
do_action( 'admin_notices' );

if ( $expected['contains'] ) {
$this->assertContains( $expected['html'], ob_get_contents() );
$this->assertStringContainsString( $expected['html'], ob_get_contents() );
} else {
$this->assertNotContains( $expected['html'], ob_get_contents() );
$this->assertStringNotContainsString( $expected['html'], ob_get_contents() );
}
ob_end_clean();
}
Expand Down

0 comments on commit 7947e17

Please sign in to comment.