aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/controllers/links/PutLinkTest.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2018-12-02 23:24:58 +0100
committerVirtualTam <virtualtam@flibidi.net>2019-01-12 22:47:48 +0100
commitbdc5152d486ca75372c271f94623b248bc127800 (patch)
tree45012b55c96215f83dc863882717822ce5aa9e25 /tests/api/controllers/links/PutLinkTest.php
parent1826e383ecf501302974132fd443cf1ca06e10f6 (diff)
downloadShaarli-bdc5152d486ca75372c271f94623b248bc127800.tar.gz
Shaarli-bdc5152d486ca75372c271f94623b248bc127800.tar.zst
Shaarli-bdc5152d486ca75372c271f94623b248bc127800.zip
namespacing: \Shaarli\History
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'tests/api/controllers/links/PutLinkTest.php')
-rw-r--r--tests/api/controllers/links/PutLinkTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/api/controllers/links/PutLinkTest.php b/tests/api/controllers/links/PutLinkTest.php
index f276b4c1..3bb4d43f 100644
--- a/tests/api/controllers/links/PutLinkTest.php
+++ b/tests/api/controllers/links/PutLinkTest.php
@@ -32,7 +32,7 @@ class PutLinkTest extends \PHPUnit_Framework_TestCase
32 protected $refDB = null; 32 protected $refDB = null;
33 33
34 /** 34 /**
35 * @var \History instance. 35 * @var \Shaarli\History instance.
36 */ 36 */
37 protected $history; 37 protected $history;
38 38
@@ -62,12 +62,12 @@ class PutLinkTest extends \PHPUnit_Framework_TestCase
62 62
63 $refHistory = new \ReferenceHistory(); 63 $refHistory = new \ReferenceHistory();
64 $refHistory->write(self::$testHistory); 64 $refHistory->write(self::$testHistory);
65 $this->history = new \History(self::$testHistory); 65 $this->history = new \Shaarli\History(self::$testHistory);
66 66
67 $this->container = new Container(); 67 $this->container = new Container();
68 $this->container['conf'] = $this->conf; 68 $this->container['conf'] = $this->conf;
69 $this->container['db'] = new \LinkDB(self::$testDatastore, true, false); 69 $this->container['db'] = new \LinkDB(self::$testDatastore, true, false);
70 $this->container['history'] = new \History(self::$testHistory); 70 $this->container['history'] = new \Shaarli\History(self::$testHistory);
71 71
72 $this->controller = new Links($this->container); 72 $this->controller = new Links($this->container);
73 73
@@ -119,7 +119,7 @@ class PutLinkTest extends \PHPUnit_Framework_TestCase
119 ); 119 );
120 120
121 $historyEntry = $this->history->getHistory()[0]; 121 $historyEntry = $this->history->getHistory()[0];
122 $this->assertEquals(\History::UPDATED, $historyEntry['event']); 122 $this->assertEquals(\Shaarli\History::UPDATED, $historyEntry['event']);
123 $this->assertTrue( 123 $this->assertTrue(
124 (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime'] 124 (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime']
125 ); 125 );