X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fbookmark%2FBookmarkFileServiceTest.php;h=c399822b5801520b78c511d91cff5d312ba2b693;hb=7b18876361f2223672f3a2cac9fc0da16d12d69f;hp=9cff0fb3463eaeff33ece155f6ce82d76a4c218a;hpb=6cdca9562c7685e9a0eb77b51584d0cc458c44e0;p=github%2Fshaarli%2FShaarli.git 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 @@ namespace Shaarli\Bookmark; use DateTime; -use PHPUnit\Framework\TestCase; use ReferenceLinkDB; use ReflectionClass; use Shaarli; @@ -14,6 +13,7 @@ use Shaarli\Bookmark\Exception\BookmarkNotFoundException; use Shaarli\Config\ConfigManager; use Shaarli\Formatter\BookmarkMarkdownFormatter; use Shaarli\History; +use Shaarli\TestCase; /** * Unitary tests for LegacyLinkDBTest @@ -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'); @@ -748,7 +747,7 @@ class BookmarkFileServiceTest extends TestCase $link = $this->publicLinkDB->findByUrl('http://mediagoblin.org/'); $this->assertNotEquals(false, $link); - $this->assertContains( + $this->assertContainsPolyfill( 'A free software media publishing platform', $link->getDescription() );