X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Flegacy%2FLegacyLinkFilterTest.php;h=45d7754d34a82cd5ff22fe52f12663c268bd3c46;hb=ce901a58289c72bf7f4dc3515a2be70562cd618b;hp=9db921a9013cb28b982404e10eb509080756116a;hpb=b1baca99f280570d0336b4d71ad1f9dca213a35b;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/legacy/LegacyLinkFilterTest.php b/tests/legacy/LegacyLinkFilterTest.php index 9db921a9..45d7754d 100644 --- a/tests/legacy/LegacyLinkFilterTest.php +++ b/tests/legacy/LegacyLinkFilterTest.php @@ -10,7 +10,7 @@ use Shaarli\Legacy\LegacyLinkFilter; /** * Class LegacyLinkFilterTest. */ -class LegacyLinkFilterTest extends \PHPUnit\Framework\TestCase +class LegacyLinkFilterTest extends \Shaarli\TestCase { /** * @var string Test datastore path. @@ -197,10 +197,10 @@ class LegacyLinkFilterTest extends \PHPUnit\Framework\TestCase /** * Use an invalid date format - * @expectedException Exception */ public function testFilterInvalidDayWithChars() { + $this->expectException(\Exception::class); $this->expectExceptionMessageRegExp('/Invalid date format/'); self::$linkFilter->filter(LegacyLinkFilter::$FILTER_DAY, 'Rainy day, dream away'); @@ -208,10 +208,10 @@ class LegacyLinkFilterTest extends \PHPUnit\Framework\TestCase /** * Use an invalid date format - * @expectedException Exception */ public function testFilterInvalidDayDigits() { + $this->expectException(\Exception::class); $this->expectExceptionMessageRegExp('/Invalid date format/'); self::$linkFilter->filter(LegacyLinkFilter::$FILTER_DAY, '20');