aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/controllers/links/PostLinkTest.php
diff options
context:
space:
mode:
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 );