aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/controllers/links/PostLinkTest.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/PostLinkTest.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/PostLinkTest.php')
-rw-r--r--tests/api/controllers/links/PostLinkTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/api/controllers/links/PostLinkTest.php b/tests/api/controllers/links/PostLinkTest.php
index 5c2b5623..a73f443c 100644
--- a/tests/api/controllers/links/PostLinkTest.php
+++ b/tests/api/controllers/links/PostLinkTest.php
@@ -40,7 +40,7 @@ class PostLinkTest extends TestCase
40 protected $refDB = null; 40 protected $refDB = null;
41 41
42 /** 42 /**
43 * @var \History instance. 43 * @var \Shaarli\History instance.
44 */ 44 */
45 protected $history; 45 protected $history;
46 46
@@ -70,12 +70,12 @@ class PostLinkTest extends TestCase
70 70
71 $refHistory = new \ReferenceHistory(); 71 $refHistory = new \ReferenceHistory();
72 $refHistory->write(self::$testHistory); 72 $refHistory->write(self::$testHistory);
73 $this->history = new \History(self::$testHistory); 73 $this->history = new \Shaarli\History(self::$testHistory);
74 74
75 $this->container = new Container(); 75 $this->container = new Container();
76 $this->container['conf'] = $this->conf; 76 $this->container['conf'] = $this->conf;
77 $this->container['db'] = new \LinkDB(self::$testDatastore, true, false); 77 $this->container['db'] = new \LinkDB(self::$testDatastore, true, false);
78 $this->container['history'] = new \History(self::$testHistory); 78 $this->container['history'] = new \Shaarli\History(self::$testHistory);
79 79
80 $this->controller = new Links($this->container); 80 $this->controller = new Links($this->container);
81 81
@@ -133,7 +133,7 @@ class PostLinkTest extends TestCase
133 $this->assertEquals('', $data['updated']); 133 $this->assertEquals('', $data['updated']);
134 134
135 $historyEntry = $this->history->getHistory()[0]; 135 $historyEntry = $this->history->getHistory()[0];
136 $this->assertEquals(\History::CREATED, $historyEntry['event']); 136 $this->assertEquals(\Shaarli\History::CREATED, $historyEntry['event']);
137 $this->assertTrue( 137 $this->assertTrue(
138 (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime'] 138 (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime']
139 ); 139 );