diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-03 12:59:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-03 12:59:16 +0200 |
commit | 7b18876361f2223672f3a2cac9fc0da16d12d69f (patch) | |
tree | 03a655c46d801d56211fb05cc2930824dace4565 /tests/bookmark/BookmarkFileServiceTest.php | |
parent | ee07b7283faa197fc062ed85f4f96f98e8e77b03 (diff) | |
parent | d246e2c5129fe8d3f8e1429b4e8ff8e3e486c779 (diff) | |
download | Shaarli-7b18876361f2223672f3a2cac9fc0da16d12d69f.tar.gz Shaarli-7b18876361f2223672f3a2cac9fc0da16d12d69f.tar.zst Shaarli-7b18876361f2223672f3a2cac9fc0da16d12d69f.zip |
Merge pull request #1575 from ArthurHoaro/feature/php8
Diffstat (limited to 'tests/bookmark/BookmarkFileServiceTest.php')
-rw-r--r-- | tests/bookmark/BookmarkFileServiceTest.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/bookmark/BookmarkFileServiceTest.php b/tests/bookmark/BookmarkFileServiceTest.php index 9cff0fb3..c399822b 100644 --- a/tests/bookmark/BookmarkFileServiceTest.php +++ b/tests/bookmark/BookmarkFileServiceTest.php | |||
@@ -6,7 +6,6 @@ | |||
6 | namespace Shaarli\Bookmark; | 6 | namespace Shaarli\Bookmark; |
7 | 7 | ||
8 | use DateTime; | 8 | use DateTime; |
9 | use PHPUnit\Framework\TestCase; | ||
10 | use ReferenceLinkDB; | 9 | use ReferenceLinkDB; |
11 | use ReflectionClass; | 10 | use ReflectionClass; |
12 | use Shaarli; | 11 | use Shaarli; |
@@ -14,6 +13,7 @@ use Shaarli\Bookmark\Exception\BookmarkNotFoundException; | |||
14 | use Shaarli\Config\ConfigManager; | 13 | use Shaarli\Config\ConfigManager; |
15 | use Shaarli\Formatter\BookmarkMarkdownFormatter; | 14 | use Shaarli\Formatter\BookmarkMarkdownFormatter; |
16 | use Shaarli\History; | 15 | use Shaarli\History; |
16 | use Shaarli\TestCase; | ||
17 | 17 | ||
18 | /** | 18 | /** |
19 | * Unitary tests for LegacyLinkDBTest | 19 | * Unitary tests for LegacyLinkDBTest |
@@ -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'); |
@@ -748,7 +747,7 @@ class BookmarkFileServiceTest extends TestCase | |||
748 | $link = $this->publicLinkDB->findByUrl('http://mediagoblin.org/'); | 747 | $link = $this->publicLinkDB->findByUrl('http://mediagoblin.org/'); |
749 | 748 | ||
750 | $this->assertNotEquals(false, $link); | 749 | $this->assertNotEquals(false, $link); |
751 | $this->assertContains( | 750 | $this->assertContainsPolyfill( |
752 | 'A free software media publishing platform', | 751 | 'A free software media publishing platform', |
753 | $link->getDescription() | 752 | $link->getDescription() |
754 | ); | 753 | ); |