]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/api/controllers/links/DeleteLinkTest.php
New plugin hook: ability to add custom filters to Shaarli search engine
[github/shaarli/Shaarli.git] / tests / api / controllers / links / DeleteLinkTest.php
index 805c9be33be49c0523ef23311d930c356b252c11..dc2cf91728b8ce537036a8b19268cb79effe28f7 100644 (file)
@@ -7,6 +7,7 @@ use malkusch\lock\mutex\NoMutex;
 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;
@@ -57,6 +58,9 @@ class DeleteLinkTest extends \Shaarli\TestCase
     /** @var NoMutex */
     protected $mutex;
 
+    /** @var PluginManager */
+    protected $pluginManager;
+
     /**
      * Before each test, instantiate a new Api with its config, plugins and bookmarks.
      */
@@ -70,7 +74,14 @@ class DeleteLinkTest extends \Shaarli\TestCase
         $refHistory = new \ReferenceHistory();
         $refHistory->write(self::$testHistory);
         $this->history = new History(self::$testHistory);
-        $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $this->mutex, true);
+        $this->pluginManager = new PluginManager($this->conf);
+        $this->bookmarkService = new BookmarkFileService(
+            $this->conf,
+            $this->pluginManager,
+            $this->history,
+            $this->mutex,
+            true
+        );
 
         $this->container = new Container();
         $this->container['conf'] = $this->conf;
@@ -105,7 +116,13 @@ class DeleteLinkTest extends \Shaarli\TestCase
         $this->assertEquals(204, $response->getStatusCode());
         $this->assertEmpty((string) $response->getBody());
 
-        $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $this->mutex, true);
+        $this->bookmarkService = new BookmarkFileService(
+            $this->conf,
+            $this->pluginManager,
+            $this->history,
+            $this->mutex,
+            true
+        );
         $this->assertFalse($this->bookmarkService->exists($id));
 
         $historyEntry = $this->history->getHistory()[0];