X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fbookmark%2FBookmarkFilterTest.php;h=48c7f8247bc02ca32900886e7f7d86aac90027c8;hb=19989964f12317e71d4e853b03647e45f3b372ad;hp=752631a5610be8f5e64f82ff1b24d0e293fa9a70;hpb=b1baca99f280570d0336b4d71ad1f9dca213a35b;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/bookmark/BookmarkFilterTest.php b/tests/bookmark/BookmarkFilterTest.php index 752631a5..48c7f824 100644 --- a/tests/bookmark/BookmarkFilterTest.php +++ b/tests/bookmark/BookmarkFilterTest.php @@ -3,10 +3,10 @@ namespace Shaarli\Bookmark; use Exception; -use PHPUnit\Framework\TestCase; use ReferenceLinkDB; use Shaarli\Config\ConfigManager; use Shaarli\History; +use Shaarli\TestCase; /** * Class BookmarkFilterTest. @@ -212,10 +212,10 @@ class BookmarkFilterTest extends TestCase /** * Use an invalid date format - * @expectedException Exception */ public function testFilterInvalidDayWithChars() { + $this->expectException(\Exception::class); $this->expectExceptionMessageRegExp('/Invalid date format/'); self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, 'Rainy day, dream away'); @@ -223,10 +223,10 @@ class BookmarkFilterTest extends TestCase /** * Use an invalid date format - * @expectedException Exception */ public function testFilterInvalidDayDigits() { + $this->expectException(\Exception::class); $this->expectExceptionMessageRegExp('/Invalid date format/'); self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, '20');