]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/api/controllers/InfoTest.php
Add history entries for API endpoint
[github/shaarli/Shaarli.git] / tests / api / controllers / InfoTest.php
index 2916eed8cbfdf286687aaa92c3c2283de1f45843..e85eb281ffa5c750c8389f33ea7a8288882c52b0 100644 (file)
@@ -1,7 +1,8 @@
 <?php
-
 namespace Shaarli\Api\Controllers;
 
+use Shaarli\Config\ConfigManager;
+
 use Slim\Container;
 use Slim\Http\Environment;
 use Slim\Http\Request;
@@ -22,7 +23,7 @@ class InfoTest extends \PHPUnit_Framework_TestCase
     protected static $testDatastore = 'sandbox/datastore.php';
 
     /**
-     * @var \ConfigManager instance
+     * @var ConfigManager instance
      */
     protected $conf;
 
@@ -46,13 +47,14 @@ class InfoTest extends \PHPUnit_Framework_TestCase
      */
     public function setUp()
     {
-        $this->conf = new \ConfigManager('tests/utils/config/configJson.json.php');
+        $this->conf = new ConfigManager('tests/utils/config/configJson.json.php');
         $this->refDB = new \ReferenceLinkDB();
         $this->refDB->write(self::$testDatastore);
 
         $this->container = new Container();
         $this->container['conf'] = $this->conf;
         $this->container['db'] = new \LinkDB(self::$testDatastore, true, false);
+        $this->container['history'] = null;
 
         $this->controller = new Info($this->container);
     }
@@ -84,7 +86,7 @@ class InfoTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals('Shaarli', $data['settings']['title']);
         $this->assertEquals('?', $data['settings']['header_link']);
         $this->assertEquals('UTC', $data['settings']['timezone']);
-        $this->assertEquals(\ConfigManager::$DEFAULT_PLUGINS, $data['settings']['enabled_plugins']);
+        $this->assertEquals(ConfigManager::$DEFAULT_PLUGINS, $data['settings']['enabled_plugins']);
         $this->assertEquals(false, $data['settings']['default_private_links']);
 
         $title = 'My links';