diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-09-29 18:41:21 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-09-29 18:57:25 +0200 |
commit | f447edb73b1bcb52e86286467d3ec7b7bdc29948 (patch) | |
tree | 3cd7f6ddc4e227f901fb8bd11d75d6307c713b1a /tests/bookmark | |
parent | ab58f2542072e6bf34acd862f6cfed84b33feb29 (diff) | |
download | Shaarli-f447edb73b1bcb52e86286467d3ec7b7bdc29948.tar.gz Shaarli-f447edb73b1bcb52e86286467d3ec7b7bdc29948.tar.zst Shaarli-f447edb73b1bcb52e86286467d3ec7b7bdc29948.zip |
Fix missing @expectedException convertion
Diffstat (limited to 'tests/bookmark')
-rw-r--r-- | tests/bookmark/BookmarkFileServiceTest.php | 3 | ||||
-rw-r--r-- | tests/bookmark/BookmarkFilterTest.php | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/tests/bookmark/BookmarkFileServiceTest.php b/tests/bookmark/BookmarkFileServiceTest.php index 51e71a85..c399822b 100644 --- a/tests/bookmark/BookmarkFileServiceTest.php +++ b/tests/bookmark/BookmarkFileServiceTest.php | |||
@@ -637,11 +637,10 @@ class BookmarkFileServiceTest extends TestCase | |||
637 | */ | 637 | */ |
638 | /** | 638 | /** |
639 | * Attempt to instantiate a LinkDB whereas the datastore is not writable | 639 | * Attempt to instantiate a LinkDB whereas the datastore is not writable |
640 | * | ||
641 | * @expectedException Shaarli\Bookmark\Exception\NotWritableDataStoreException | ||
642 | */ | 640 | */ |
643 | public function testConstructDatastoreNotWriteable() | 641 | public function testConstructDatastoreNotWriteable() |
644 | { | 642 | { |
643 | $this->expectException(\Shaarli\Bookmark\Exception\NotWritableDataStoreException::class); | ||
645 | $this->expectExceptionMessageRegExp('#Couldn\'t load data from the data store file "null".*#'); | 644 | $this->expectExceptionMessageRegExp('#Couldn\'t load data from the data store file "null".*#'); |
646 | 645 | ||
647 | $conf = new ConfigManager('tests/utils/config/configJson'); | 646 | $conf = new ConfigManager('tests/utils/config/configJson'); |
diff --git a/tests/bookmark/BookmarkFilterTest.php b/tests/bookmark/BookmarkFilterTest.php index 2f15cb3c..48c7f824 100644 --- a/tests/bookmark/BookmarkFilterTest.php +++ b/tests/bookmark/BookmarkFilterTest.php | |||
@@ -212,10 +212,10 @@ class BookmarkFilterTest extends TestCase | |||
212 | 212 | ||
213 | /** | 213 | /** |
214 | * Use an invalid date format | 214 | * Use an invalid date format |
215 | * @expectedException Exception | ||
216 | */ | 215 | */ |
217 | public function testFilterInvalidDayWithChars() | 216 | public function testFilterInvalidDayWithChars() |
218 | { | 217 | { |
218 | $this->expectException(\Exception::class); | ||
219 | $this->expectExceptionMessageRegExp('/Invalid date format/'); | 219 | $this->expectExceptionMessageRegExp('/Invalid date format/'); |
220 | 220 | ||
221 | self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, 'Rainy day, dream away'); | 221 | self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, 'Rainy day, dream away'); |
@@ -223,10 +223,10 @@ class BookmarkFilterTest extends TestCase | |||
223 | 223 | ||
224 | /** | 224 | /** |
225 | * Use an invalid date format | 225 | * Use an invalid date format |
226 | * @expectedException Exception | ||
227 | */ | 226 | */ |
228 | public function testFilterInvalidDayDigits() | 227 | public function testFilterInvalidDayDigits() |
229 | { | 228 | { |
229 | $this->expectException(\Exception::class); | ||
230 | $this->expectExceptionMessageRegExp('/Invalid date format/'); | 230 | $this->expectExceptionMessageRegExp('/Invalid date format/'); |
231 | 231 | ||
232 | self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, '20'); | 232 | self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, '20'); |