X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=blobdiff_plain;f=tests%2Fapi%2Fcontrollers%2Flinks%2FDeleteLinkTest.php;fp=tests%2Fapi%2Fcontrollers%2Flinks%2FDeleteLinkTest.php;h=dc2cf91728b8ce537036a8b19268cb79effe28f7;hp=805c9be33be49c0523ef23311d930c356b252c11;hb=bcba6bd353161fab456b423e93571ab027d5423c;hpb=8997ae6c8e24286f7d47981eaf905e80d2481c10 diff --git a/tests/api/controllers/links/DeleteLinkTest.php b/tests/api/controllers/links/DeleteLinkTest.php index 805c9be3..dc2cf917 100644 --- a/tests/api/controllers/links/DeleteLinkTest.php +++ b/tests/api/controllers/links/DeleteLinkTest.php @@ -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];