X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fbookmark%2FBookmarkFilterTest.php;h=48c7f8247bc02ca32900886e7f7d86aac90027c8;hb=df25b28dcd3cde54d42c18a55a810daa82bf5727;hp=752631a5610be8f5e64f82ff1b24d0e293fa9a70;hpb=6cdca9562c7685e9a0eb77b51584d0cc458c44e0;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');