diff options
Diffstat (limited to 'tests/netscape')
-rw-r--r-- | tests/netscape/BookmarkExportTest.php | 13 | ||||
-rw-r--r-- | tests/netscape/BookmarkImportTest.php | 13 |
2 files changed, 24 insertions, 2 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 | } |
diff --git a/tests/netscape/BookmarkImportTest.php b/tests/netscape/BookmarkImportTest.php index 6856ebca..ecd33ea1 100644 --- a/tests/netscape/BookmarkImportTest.php +++ b/tests/netscape/BookmarkImportTest.php | |||
@@ -10,6 +10,7 @@ use Shaarli\Bookmark\BookmarkFileService; | |||
10 | use Shaarli\Bookmark\BookmarkFilter; | 10 | use Shaarli\Bookmark\BookmarkFilter; |
11 | use Shaarli\Config\ConfigManager; | 11 | use Shaarli\Config\ConfigManager; |
12 | use Shaarli\History; | 12 | use Shaarli\History; |
13 | use Shaarli\Plugin\PluginManager; | ||
13 | use Shaarli\TestCase; | 14 | use Shaarli\TestCase; |
14 | use Slim\Http\UploadedFile; | 15 | use Slim\Http\UploadedFile; |
15 | 16 | ||
@@ -71,6 +72,9 @@ class BookmarkImportTest extends TestCase | |||
71 | */ | 72 | */ |
72 | protected $netscapeBookmarkUtils; | 73 | protected $netscapeBookmarkUtils; |
73 | 74 | ||
75 | /** @var PluginManager */ | ||
76 | protected $pluginManager; | ||
77 | |||
74 | /** | 78 | /** |
75 | * @var string Save the current timezone. | 79 | * @var string Save the current timezone. |
76 | */ | 80 | */ |
@@ -99,7 +103,14 @@ class BookmarkImportTest extends TestCase | |||
99 | $this->conf->set('resource.page_cache', $this->pagecache); | 103 | $this->conf->set('resource.page_cache', $this->pagecache); |
100 | $this->conf->set('resource.datastore', self::$testDatastore); | 104 | $this->conf->set('resource.datastore', self::$testDatastore); |
101 | $this->history = new History(self::$historyFilePath); | 105 | $this->history = new History(self::$historyFilePath); |
102 | $this->bookmarkService = new BookmarkFileService($this->conf, $this->history, $mutex, true); | 106 | $this->pluginManager = new PluginManager($this->conf); |
107 | $this->bookmarkService = new BookmarkFileService( | ||
108 | $this->conf, | ||
109 | $this->pluginManager, | ||
110 | $this->history, | ||
111 | $mutex, | ||
112 | true | ||
113 | ); | ||
103 | $this->netscapeBookmarkUtils = new NetscapeBookmarkUtils($this->bookmarkService, $this->conf, $this->history); | 114 | $this->netscapeBookmarkUtils = new NetscapeBookmarkUtils($this->bookmarkService, $this->conf, $this->history); |
104 | } | 115 | } |
105 | 116 | ||