diff options
Diffstat (limited to 'tests/bookmark/BookmarkFilterTest.php')
-rw-r--r-- | tests/bookmark/BookmarkFilterTest.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/bookmark/BookmarkFilterTest.php b/tests/bookmark/BookmarkFilterTest.php index 91e139c2..752631a5 100644 --- a/tests/bookmark/BookmarkFilterTest.php +++ b/tests/bookmark/BookmarkFilterTest.php | |||
@@ -213,20 +213,22 @@ class BookmarkFilterTest extends TestCase | |||
213 | /** | 213 | /** |
214 | * Use an invalid date format | 214 | * Use an invalid date format |
215 | * @expectedException Exception | 215 | * @expectedException Exception |
216 | * @expectedExceptionMessageRegExp /Invalid date format/ | ||
217 | */ | 216 | */ |
218 | public function testFilterInvalidDayWithChars() | 217 | public function testFilterInvalidDayWithChars() |
219 | { | 218 | { |
219 | $this->expectExceptionMessageRegExp('/Invalid date format/'); | ||
220 | |||
220 | self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, 'Rainy day, dream away'); | 221 | self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, 'Rainy day, dream away'); |
221 | } | 222 | } |
222 | 223 | ||
223 | /** | 224 | /** |
224 | * Use an invalid date format | 225 | * Use an invalid date format |
225 | * @expectedException Exception | 226 | * @expectedException Exception |
226 | * @expectedExceptionMessageRegExp /Invalid date format/ | ||
227 | */ | 227 | */ |
228 | public function testFilterInvalidDayDigits() | 228 | public function testFilterInvalidDayDigits() |
229 | { | 229 | { |
230 | $this->expectExceptionMessageRegExp('/Invalid date format/'); | ||
231 | |||
230 | self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, '20'); | 232 | self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, '20'); |
231 | } | 233 | } |
232 | 234 | ||
@@ -250,11 +252,11 @@ class BookmarkFilterTest extends TestCase | |||
250 | 252 | ||
251 | /** | 253 | /** |
252 | * No link for this hash | 254 | * No link for this hash |
253 | * | ||
254 | * @expectedException \Shaarli\Bookmark\Exception\BookmarkNotFoundException | ||
255 | */ | 255 | */ |
256 | public function testFilterUnknownSmallHash() | 256 | public function testFilterUnknownSmallHash() |
257 | { | 257 | { |
258 | $this->expectException(\Shaarli\Bookmark\Exception\BookmarkNotFoundException::class); | ||
259 | |||
258 | self::$linkFilter->filter(BookmarkFilter::$FILTER_HASH, 'Iblaah'); | 260 | self::$linkFilter->filter(BookmarkFilter::$FILTER_HASH, 'Iblaah'); |
259 | } | 261 | } |
260 | 262 | ||