aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/controllers/tags/GetTagsTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-10-13 13:30:37 +0200
committerGitHub <noreply@github.com>2020-10-13 13:30:37 +0200
commit29c31b7ec6ca48ba37b7eb6da650931fd0cb7164 (patch)
treee4017d3c979604f40e78cdc305f0ab191aedd4b9 /tests/api/controllers/tags/GetTagsTest.php
parent458b6b9918ec27154dd45416947bb93bedb97109 (diff)
parentfd1ddad98df45bc3c18be7980c1cbe68ce6b219c (diff)
downloadShaarli-29c31b7ec6ca48ba37b7eb6da650931fd0cb7164.tar.gz
Shaarli-29c31b7ec6ca48ba37b7eb6da650931fd0cb7164.tar.zst
Shaarli-29c31b7ec6ca48ba37b7eb6da650931fd0cb7164.zip
Merge pull request #1570 from ArthurHoaro/feature/datastore-mutex
Add mutex on datastore I/O operations
Diffstat (limited to 'tests/api/controllers/tags/GetTagsTest.php')
-rw-r--r--tests/api/controllers/tags/GetTagsTest.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/api/controllers/tags/GetTagsTest.php b/tests/api/controllers/tags/GetTagsTest.php
index 3459fdfa..b565a8c4 100644
--- a/tests/api/controllers/tags/GetTagsTest.php
+++ b/tests/api/controllers/tags/GetTagsTest.php
@@ -1,6 +1,7 @@
1<?php 1<?php
2namespace Shaarli\Api\Controllers; 2namespace Shaarli\Api\Controllers;
3 3
4use malkusch\lock\mutex\NoMutex;
4use Shaarli\Bookmark\BookmarkFileService; 5use Shaarli\Bookmark\BookmarkFileService;
5use Shaarli\Bookmark\LinkDB; 6use Shaarli\Bookmark\LinkDB;
6use Shaarli\Config\ConfigManager; 7use Shaarli\Config\ConfigManager;
@@ -59,13 +60,14 @@ class GetTagsTest extends \Shaarli\TestCase
59 */ 60 */
60 protected function setUp(): void 61 protected function setUp(): void
61 { 62 {
63 $mutex = new NoMutex();
62 $this->conf = new ConfigManager('tests/utils/config/configJson'); 64 $this->conf = new ConfigManager('tests/utils/config/configJson');
63 $this->conf->set('resource.datastore', self::$testDatastore); 65 $this->conf->set('resource.datastore', self::$testDatastore);
64 $this->refDB = new \ReferenceLinkDB(); 66 $this->refDB = new \ReferenceLinkDB();
65 $this->refDB->write(self::$testDatastore); 67 $this->refDB->write(self::$testDatastore);
66 $history = new History('sandbox/history.php'); 68 $history = new History('sandbox/history.php');
67 69
68 $this->bookmarkService = new BookmarkFileService($this->conf, $history, true); 70 $this->bookmarkService = new BookmarkFileService($this->conf, $history, $mutex, true);
69 71
70 $this->container = new Container(); 72 $this->container = new Container();
71 $this->container['conf'] = $this->conf; 73 $this->container['conf'] = $this->conf;