diff options
author | ArthurHoaro <arthur@hoa.ro> | 2021-01-20 15:59:00 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2021-02-04 11:02:50 +0100 |
commit | bcba6bd353161fab456b423e93571ab027d5423c (patch) | |
tree | 97a618b77d327a5f963c91522988e24db5a9e158 /tests/api/controllers/links/GetLinkIdTest.php | |
parent | 8997ae6c8e24286f7d47981eaf905e80d2481c10 (diff) | |
download | Shaarli-bcba6bd353161fab456b423e93571ab027d5423c.tar.gz Shaarli-bcba6bd353161fab456b423e93571ab027d5423c.tar.zst Shaarli-bcba6bd353161fab456b423e93571ab027d5423c.zip |
New plugin hook: ability to add custom filters to Shaarli search engine
A new plugin hook has been added: hook_test_filter_search_entry
This hook allows to filter out bookmark with custom plugin code when a search is performed.
Related to #143
Diffstat (limited to 'tests/api/controllers/links/GetLinkIdTest.php')
-rw-r--r-- | tests/api/controllers/links/GetLinkIdTest.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/api/controllers/links/GetLinkIdTest.php b/tests/api/controllers/links/GetLinkIdTest.php index 1ec56ef3..c93a3b4b 100644 --- a/tests/api/controllers/links/GetLinkIdTest.php +++ b/tests/api/controllers/links/GetLinkIdTest.php | |||
@@ -7,6 +7,7 @@ use Shaarli\Bookmark\Bookmark; | |||
7 | use Shaarli\Bookmark\BookmarkFileService; | 7 | use Shaarli\Bookmark\BookmarkFileService; |
8 | use Shaarli\Config\ConfigManager; | 8 | use Shaarli\Config\ConfigManager; |
9 | use Shaarli\History; | 9 | use Shaarli\History; |
10 | use Shaarli\Plugin\PluginManager; | ||
10 | use Slim\Container; | 11 | use Slim\Container; |
11 | use Slim\Http\Environment; | 12 | use Slim\Http\Environment; |
12 | use Slim\Http\Request; | 13 | use Slim\Http\Request; |
@@ -67,7 +68,14 @@ class GetLinkIdTest extends \Shaarli\TestCase | |||
67 | 68 | ||
68 | $this->container = new Container(); | 69 | $this->container = new Container(); |
69 | $this->container['conf'] = $this->conf; | 70 | $this->container['conf'] = $this->conf; |
70 | $this->container['db'] = new BookmarkFileService($this->conf, $history, $mutex, true); | 71 | $pluginManager = new PluginManager($this->conf); |
72 | $this->container['db'] = new BookmarkFileService( | ||
73 | $this->conf, | ||
74 | $pluginManager, | ||
75 | $history, | ||
76 | $mutex, | ||
77 | true | ||
78 | ); | ||
71 | $this->container['history'] = null; | 79 | $this->container['history'] = null; |
72 | 80 | ||
73 | $this->controller = new Links($this->container); | 81 | $this->controller = new Links($this->container); |