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/netscape/BookmarkExportTest.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/netscape/BookmarkExportTest.php')
-rw-r--r-- | tests/netscape/BookmarkExportTest.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/netscape/BookmarkExportTest.php b/tests/netscape/BookmarkExportTest.php index ad288f78..b8a88cd8 100644 --- a/tests/netscape/BookmarkExportTest.php +++ b/tests/netscape/BookmarkExportTest.php | |||
@@ -8,6 +8,7 @@ use Shaarli\Config\ConfigManager; | |||
8 | use Shaarli\Formatter\BookmarkFormatter; | 8 | use Shaarli\Formatter\BookmarkFormatter; |
9 | use Shaarli\Formatter\FormatterFactory; | 9 | use Shaarli\Formatter\FormatterFactory; |
10 | use Shaarli\History; | 10 | use Shaarli\History; |
11 | use Shaarli\Plugin\PluginManager; | ||
11 | use Shaarli\TestCase; | 12 | use Shaarli\TestCase; |
12 | 13 | ||
13 | require_once 'tests/utils/ReferenceLinkDB.php'; | 14 | require_once 'tests/utils/ReferenceLinkDB.php'; |
@@ -47,6 +48,9 @@ class BookmarkExportTest extends TestCase | |||
47 | */ | 48 | */ |
48 | protected static $history; | 49 | protected static $history; |
49 | 50 | ||
51 | /** @var PluginManager */ | ||
52 | protected static $pluginManager; | ||
53 | |||
50 | /** | 54 | /** |
51 | * @var NetscapeBookmarkUtils | 55 | * @var NetscapeBookmarkUtils |
52 | */ | 56 | */ |
@@ -63,7 +67,14 @@ class BookmarkExportTest extends TestCase | |||
63 | static::$refDb = new \ReferenceLinkDB(); | 67 | static::$refDb = new \ReferenceLinkDB(); |
64 | static::$refDb->write(static::$testDatastore); | 68 | static::$refDb->write(static::$testDatastore); |
65 | static::$history = new History('sandbox/history.php'); | 69 | static::$history = new History('sandbox/history.php'); |
66 | static::$bookmarkService = new BookmarkFileService(static::$conf, static::$history, $mutex, true); | 70 | static::$pluginManager = new PluginManager(static::$conf); |
71 | static::$bookmarkService = new BookmarkFileService( | ||
72 | static::$conf, | ||
73 | static::$pluginManager, | ||
74 | static::$history, | ||
75 | $mutex, | ||
76 | true | ||
77 | ); | ||
67 | $factory = new FormatterFactory(static::$conf, true); | 78 | $factory = new FormatterFactory(static::$conf, true); |
68 | static::$formatter = $factory->getFormatter('raw'); | 79 | static::$formatter = $factory->getFormatter('raw'); |
69 | } | 80 | } |