diff options
Diffstat (limited to 'tests/api/ApiMiddlewareTest.php')
-rw-r--r-- | tests/api/ApiMiddlewareTest.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/api/ApiMiddlewareTest.php b/tests/api/ApiMiddlewareTest.php index 0b9b03f2..df2fb33a 100644 --- a/tests/api/ApiMiddlewareTest.php +++ b/tests/api/ApiMiddlewareTest.php | |||
@@ -2,6 +2,7 @@ | |||
2 | namespace Shaarli\Api; | 2 | namespace Shaarli\Api; |
3 | 3 | ||
4 | use Shaarli\Config\ConfigManager; | 4 | use Shaarli\Config\ConfigManager; |
5 | use Shaarli\History; | ||
5 | use Slim\Container; | 6 | use Slim\Container; |
6 | use Slim\Http\Environment; | 7 | use Slim\Http\Environment; |
7 | use Slim\Http\Request; | 8 | use Slim\Http\Request; |
@@ -40,18 +41,21 @@ class ApiMiddlewareTest extends \PHPUnit\Framework\TestCase | |||
40 | protected $container; | 41 | protected $container; |
41 | 42 | ||
42 | /** | 43 | /** |
43 | * Before every test, instantiate a new Api with its config, plugins and links. | 44 | * Before every test, instantiate a new Api with its config, plugins and bookmarks. |
44 | */ | 45 | */ |
45 | public function setUp() | 46 | public function setUp() |
46 | { | 47 | { |
47 | $this->conf = new ConfigManager('tests/utils/config/configJson.json.php'); | 48 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
48 | $this->conf->set('api.secret', 'NapoleonWasALizard'); | 49 | $this->conf->set('api.secret', 'NapoleonWasALizard'); |
49 | 50 | ||
50 | $this->refDB = new \ReferenceLinkDB(); | 51 | $this->refDB = new \ReferenceLinkDB(); |
51 | $this->refDB->write(self::$testDatastore); | 52 | $this->refDB->write(self::$testDatastore); |
52 | 53 | ||
54 | $history = new History('sandbox/history.php'); | ||
55 | |||
53 | $this->container = new Container(); | 56 | $this->container = new Container(); |
54 | $this->container['conf'] = $this->conf; | 57 | $this->container['conf'] = $this->conf; |
58 | $this->container['history'] = $history; | ||
55 | } | 59 | } |
56 | 60 | ||
57 | /** | 61 | /** |