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/LegacyLinkDBTest.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/LegacyLinkDBTest.php')
-rw-r--r-- | tests/legacy/LegacyLinkDBTest.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/legacy/LegacyLinkDBTest.php b/tests/legacy/LegacyLinkDBTest.php index 92cf607c..819bc272 100644 --- a/tests/legacy/LegacyLinkDBTest.php +++ b/tests/legacy/LegacyLinkDBTest.php | |||
@@ -101,10 +101,11 @@ class LegacyLinkDBTest extends \PHPUnit\Framework\TestCase | |||
101 | * Attempt to instantiate a LinkDB whereas the datastore is not writable | 101 | * Attempt to instantiate a LinkDB whereas the datastore is not writable |
102 | * | 102 | * |
103 | * @expectedException Shaarli\Exceptions\IOException | 103 | * @expectedException Shaarli\Exceptions\IOException |
104 | * @expectedExceptionMessageRegExp /Error accessing "null"/ | ||
105 | */ | 104 | */ |
106 | public function testConstructDatastoreNotWriteable() | 105 | public function testConstructDatastoreNotWriteable() |
107 | { | 106 | { |
107 | $this->expectExceptionMessageRegExp('/Error accessing "null"/'); | ||
108 | |||
108 | new LegacyLinkDB('null/store.db', false, false); | 109 | new LegacyLinkDB('null/store.db', false, false); |
109 | } | 110 | } |
110 | 111 | ||
@@ -420,22 +421,22 @@ class LegacyLinkDBTest extends \PHPUnit\Framework\TestCase | |||
420 | 421 | ||
421 | /** | 422 | /** |
422 | * Test filterHash() with an invalid smallhash. | 423 | * Test filterHash() with an invalid smallhash. |
423 | * | ||
424 | * @expectedException \Shaarli\Bookmark\Exception\BookmarkNotFoundException | ||
425 | */ | 424 | */ |
426 | public function testFilterHashInValid1() | 425 | public function testFilterHashInValid1() |
427 | { | 426 | { |
427 | $this->expectException(\Shaarli\Bookmark\Exception\BookmarkNotFoundException::class); | ||
428 | |||
428 | $request = 'blabla'; | 429 | $request = 'blabla'; |
429 | self::$publicLinkDB->filterHash($request); | 430 | self::$publicLinkDB->filterHash($request); |
430 | } | 431 | } |
431 | 432 | ||
432 | /** | 433 | /** |
433 | * Test filterHash() with an empty smallhash. | 434 | * Test filterHash() with an empty smallhash. |
434 | * | ||
435 | * @expectedException \Shaarli\Bookmark\Exception\BookmarkNotFoundException | ||
436 | */ | 435 | */ |
437 | public function testFilterHashInValid() | 436 | public function testFilterHashInValid() |
438 | { | 437 | { |
438 | $this->expectException(\Shaarli\Bookmark\Exception\BookmarkNotFoundException::class); | ||
439 | |||
439 | self::$publicLinkDB->filterHash(''); | 440 | self::$publicLinkDB->filterHash(''); |
440 | } | 441 | } |
441 | 442 | ||