]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/api/controllers/links/DeleteLinkTest.php
namespacing: \Shaarli\Bookmark\LinkDB
[github/shaarli/Shaarli.git] / tests / api / controllers / links / DeleteLinkTest.php
index 7d79713779cc70bf1c18c3ae3803196be6af3990..adca9a4e71ea7df4c1a60b771678a776533aa35b 100644 (file)
@@ -32,12 +32,12 @@ class DeleteLinkTest extends \PHPUnit_Framework_TestCase
     protected $refDB = null;
 
     /**
-     * @var \LinkDB instance.
+     * @var \Shaarli\Bookmark\LinkDB instance.
      */
     protected $linkDB;
 
     /**
-     * @var \History instance.
+     * @var \Shaarli\History instance.
      */
     protected $history;
 
@@ -59,10 +59,10 @@ class DeleteLinkTest extends \PHPUnit_Framework_TestCase
         $this->conf = new ConfigManager('tests/utils/config/configJson');
         $this->refDB = new \ReferenceLinkDB();
         $this->refDB->write(self::$testDatastore);
-        $this->linkDB = new \LinkDB(self::$testDatastore, true, false);
+        $this->linkDB = new \Shaarli\Bookmark\LinkDB(self::$testDatastore, true, false);
         $refHistory = new \ReferenceHistory();
         $refHistory->write(self::$testHistory);
-        $this->history = new \History(self::$testHistory);
+        $this->history = new \Shaarli\History(self::$testHistory);
         $this->container = new Container();
         $this->container['conf'] = $this->conf;
         $this->container['db'] = $this->linkDB;
@@ -96,11 +96,11 @@ class DeleteLinkTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals(204, $response->getStatusCode());
         $this->assertEmpty((string) $response->getBody());
 
-        $this->linkDB = new \LinkDB(self::$testDatastore, true, false);
+        $this->linkDB = new \Shaarli\Bookmark\LinkDB(self::$testDatastore, true, false);
         $this->assertFalse(isset($this->linkDB[$id]));
 
         $historyEntry = $this->history->getHistory()[0];
-        $this->assertEquals(\History::DELETED, $historyEntry['event']);
+        $this->assertEquals(\Shaarli\History::DELETED, $historyEntry['event']);
         $this->assertTrue(
             (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime']
         );