]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/api/controllers/links/GetLinkIdTest.php
Merge pull request #1698 from ArthurHoaro/feature/plugins-search-filter
[github/shaarli/Shaarli.git] / tests / api / controllers / links / GetLinkIdTest.php
index 3a3aaa7b8d8696c0ef0a4077a882e414415728d6..c93a3b4b3139949b7fd023108ee9519b27a7cee3 100644 (file)
@@ -2,10 +2,12 @@
 
 namespace Shaarli\Api\Controllers;
 
+use malkusch\lock\mutex\NoMutex;
 use Shaarli\Bookmark\Bookmark;
 use Shaarli\Bookmark\BookmarkFileService;
 use Shaarli\Config\ConfigManager;
 use Shaarli\History;
+use Shaarli\Plugin\PluginManager;
 use Slim\Container;
 use Slim\Http\Environment;
 use Slim\Http\Request;
@@ -20,7 +22,7 @@ use Slim\Http\Response;
  *
  * @package Shaarli\Api\Controllers
  */
-class GetLinkIdTest extends \PHPUnit\Framework\TestCase
+class GetLinkIdTest extends \Shaarli\TestCase
 {
     /**
      * @var string datastore to test write operations
@@ -57,6 +59,7 @@ class GetLinkIdTest extends \PHPUnit\Framework\TestCase
      */
     protected function setUp(): void
     {
+        $mutex = new NoMutex();
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->conf->set('resource.datastore', self::$testDatastore);
         $this->refDB = new \ReferenceLinkDB();
@@ -65,7 +68,14 @@ class GetLinkIdTest extends \PHPUnit\Framework\TestCase
 
         $this->container = new Container();
         $this->container['conf'] = $this->conf;
-        $this->container['db'] = new BookmarkFileService($this->conf, $history, true);
+        $pluginManager = new PluginManager($this->conf);
+        $this->container['db'] = new BookmarkFileService(
+            $this->conf,
+            $pluginManager,
+            $history,
+            $mutex,
+            true
+        );
         $this->container['history'] = null;
 
         $this->controller = new Links($this->container);