From f447edb73b1bcb52e86286467d3ec7b7bdc29948 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 29 Sep 2020 18:41:21 +0200 Subject: Fix missing @expectedException convertion --- tests/bookmark/BookmarkFileServiceTest.php | 3 +-- tests/bookmark/BookmarkFilterTest.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/bookmark') 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 */ /** * Attempt to instantiate a LinkDB whereas the datastore is not writable - * - * @expectedException Shaarli\Bookmark\Exception\NotWritableDataStoreException */ public function testConstructDatastoreNotWriteable() { + $this->expectException(\Shaarli\Bookmark\Exception\NotWritableDataStoreException::class); $this->expectExceptionMessageRegExp('#Couldn\'t load data from the data store file "null".*#'); $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 /** * Use an invalid date format - * @expectedException Exception */ public function testFilterInvalidDayWithChars() { + $this->expectException(\Exception::class); $this->expectExceptionMessageRegExp('/Invalid date format/'); self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, 'Rainy day, dream away'); @@ -223,10 +223,10 @@ class BookmarkFilterTest extends TestCase /** * Use an invalid date format - * @expectedException Exception */ public function testFilterInvalidDayDigits() { + $this->expectException(\Exception::class); $this->expectExceptionMessageRegExp('/Invalid date format/'); self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, '20'); -- cgit v1.2.3