Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
kadencewp committed Dec 3, 2024
1 parent 0f8f4b8 commit 007ca4b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/wpunit/Admin/NoticeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use StellarWP\Uplink\Admin\Notice;
use StellarWP\Uplink\Tests\UplinkTestCase;
use StellarWP\Uplink\Config;

class NoticeTest extends UplinkTestCase {

Expand All @@ -24,4 +25,14 @@ public function test_it_should_display_notice() {
$notice->setup_notices();
}

public function test_it_should_display_notice_with_link() {
Config::set_hook_prefix( 'events-calendar-pro' );
$notice = new Notice();
$notice->add_notice( Notice::EXPIRED_KEY, 'uplink' );

$this->expectOutputString( '<p>Your license is expired <a href="https://evnt.is/195y" target="_blank" class="button button-primary">Renew Your License Now <span class="screen-reader-text">(opens in a new window)</span></a></p>' );

$notice->setup_notices();
}

}

0 comments on commit 007ca4b

Please sign in to comment.