]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/bookmark/BookmarkFilterTest.php
Add mutex on datastore I/O operations
[github/shaarli/Shaarli.git] / tests / bookmark / BookmarkFilterTest.php
index 48c7f8247bc02ca32900886e7f7d86aac90027c8..644abbc8429f18b51c64c6a64a6cac7d50fc7598 100644 (file)
@@ -3,6 +3,7 @@
 namespace Shaarli\Bookmark;
 
 use Exception;
+use malkusch\lock\mutex\NoMutex;
 use ReferenceLinkDB;
 use Shaarli\Config\ConfigManager;
 use Shaarli\History;
@@ -37,12 +38,13 @@ class BookmarkFilterTest extends TestCase
      */
     public static function setUpBeforeClass(): void
     {
+        $mutex = new NoMutex();
         $conf = new ConfigManager('tests/utils/config/configJson');
         $conf->set('resource.datastore', self::$testDatastore);
         self::$refDB = new \ReferenceLinkDB();
         self::$refDB->write(self::$testDatastore);
         $history = new History('sandbox/history.php');
-        self::$bookmarkService = new \FakeBookmarkService($conf, $history, true);
+        self::$bookmarkService = new \FakeBookmarkService($conf, $history, $mutex, true);
         self::$linkFilter = new BookmarkFilter(self::$bookmarkService->getBookmarks());
     }