]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/legacy/LegacyLinkFilterTest.php
Merge pull request #1619 from ArthurHoaro/fix/translations
[github/shaarli/Shaarli.git] / tests / legacy / LegacyLinkFilterTest.php
index 9db921a9013cb28b982404e10eb509080756116a..45d7754d34a82cd5ff22fe52f12663c268bd3c46 100644 (file)
@@ -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');