diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-09-27 14:07:08 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-09-27 14:09:55 +0200 |
commit | b1baca99f280570d0336b4d71ad1f9dca213a35b (patch) | |
tree | 518de2057da549d0baa982c6aa689aa813377774 /tests/legacy/LegacyLinkFilterTest.php | |
parent | 8f60e1206e45e67c96a7630d4ff94e72fe875f09 (diff) | |
download | Shaarli-b1baca99f280570d0336b4d71ad1f9dca213a35b.tar.gz Shaarli-b1baca99f280570d0336b4d71ad1f9dca213a35b.tar.zst Shaarli-b1baca99f280570d0336b4d71ad1f9dca213a35b.zip |
Convert legacy PHPUnit @expected* to new ->expect*
Converted automatically using https://github.com/ArthurHoaro/convert-legacy-phpunit-expect
Diffstat (limited to 'tests/legacy/LegacyLinkFilterTest.php')
-rw-r--r-- | tests/legacy/LegacyLinkFilterTest.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/legacy/LegacyLinkFilterTest.php b/tests/legacy/LegacyLinkFilterTest.php index 8223cc15..9db921a9 100644 --- a/tests/legacy/LegacyLinkFilterTest.php +++ b/tests/legacy/LegacyLinkFilterTest.php | |||
@@ -198,20 +198,22 @@ class LegacyLinkFilterTest extends \PHPUnit\Framework\TestCase | |||
198 | /** | 198 | /** |
199 | * Use an invalid date format | 199 | * Use an invalid date format |
200 | * @expectedException Exception | 200 | * @expectedException Exception |
201 | * @expectedExceptionMessageRegExp /Invalid date format/ | ||
202 | */ | 201 | */ |
203 | public function testFilterInvalidDayWithChars() | 202 | public function testFilterInvalidDayWithChars() |
204 | { | 203 | { |
204 | $this->expectExceptionMessageRegExp('/Invalid date format/'); | ||
205 | |||
205 | self::$linkFilter->filter(LegacyLinkFilter::$FILTER_DAY, 'Rainy day, dream away'); | 206 | self::$linkFilter->filter(LegacyLinkFilter::$FILTER_DAY, 'Rainy day, dream away'); |
206 | } | 207 | } |
207 | 208 | ||
208 | /** | 209 | /** |
209 | * Use an invalid date format | 210 | * Use an invalid date format |
210 | * @expectedException Exception | 211 | * @expectedException Exception |
211 | * @expectedExceptionMessageRegExp /Invalid date format/ | ||
212 | */ | 212 | */ |
213 | public function testFilterInvalidDayDigits() | 213 | public function testFilterInvalidDayDigits() |
214 | { | 214 | { |
215 | $this->expectExceptionMessageRegExp('/Invalid date format/'); | ||
216 | |||
215 | self::$linkFilter->filter(LegacyLinkFilter::$FILTER_DAY, '20'); | 217 | self::$linkFilter->filter(LegacyLinkFilter::$FILTER_DAY, '20'); |
216 | } | 218 | } |
217 | 219 | ||
@@ -235,11 +237,11 @@ class LegacyLinkFilterTest extends \PHPUnit\Framework\TestCase | |||
235 | 237 | ||
236 | /** | 238 | /** |
237 | * No link for this hash | 239 | * No link for this hash |
238 | * | ||
239 | * @expectedException \Shaarli\Bookmark\Exception\BookmarkNotFoundException | ||
240 | */ | 240 | */ |
241 | public function testFilterUnknownSmallHash() | 241 | public function testFilterUnknownSmallHash() |
242 | { | 242 | { |
243 | $this->expectException(\Shaarli\Bookmark\Exception\BookmarkNotFoundException::class); | ||
244 | |||
243 | self::$linkFilter->filter(LegacyLinkFilter::$FILTER_HASH, 'Iblaah'); | 245 | self::$linkFilter->filter(LegacyLinkFilter::$FILTER_HASH, 'Iblaah'); |
244 | } | 246 | } |
245 | 247 | ||