diff options
Diffstat (limited to 'tests/api/controllers/tags')
-rw-r--r-- | tests/api/controllers/tags/DeleteTagTest.php | 10 | ||||
-rw-r--r-- | tests/api/controllers/tags/PutTagTest.php | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/api/controllers/tags/DeleteTagTest.php b/tests/api/controllers/tags/DeleteTagTest.php index e0787ce2..a1e419cd 100644 --- a/tests/api/controllers/tags/DeleteTagTest.php +++ b/tests/api/controllers/tags/DeleteTagTest.php | |||
@@ -37,7 +37,7 @@ class DeleteTagTest extends \PHPUnit_Framework_TestCase | |||
37 | protected $linkDB; | 37 | protected $linkDB; |
38 | 38 | ||
39 | /** | 39 | /** |
40 | * @var \History instance. | 40 | * @var \Shaarli\History instance. |
41 | */ | 41 | */ |
42 | protected $history; | 42 | protected $history; |
43 | 43 | ||
@@ -62,7 +62,7 @@ class DeleteTagTest extends \PHPUnit_Framework_TestCase | |||
62 | $this->linkDB = new \LinkDB(self::$testDatastore, true, false); | 62 | $this->linkDB = new \LinkDB(self::$testDatastore, true, false); |
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 | $this->container = new Container(); | 66 | $this->container = new Container(); |
67 | $this->container['conf'] = $this->conf; | 67 | $this->container['conf'] = $this->conf; |
68 | $this->container['db'] = $this->linkDB; | 68 | $this->container['db'] = $this->linkDB; |
@@ -103,12 +103,12 @@ class DeleteTagTest extends \PHPUnit_Framework_TestCase | |||
103 | 103 | ||
104 | // 2 links affected | 104 | // 2 links affected |
105 | $historyEntry = $this->history->getHistory()[0]; | 105 | $historyEntry = $this->history->getHistory()[0]; |
106 | $this->assertEquals(\History::UPDATED, $historyEntry['event']); | 106 | $this->assertEquals(\Shaarli\History::UPDATED, $historyEntry['event']); |
107 | $this->assertTrue( | 107 | $this->assertTrue( |
108 | (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime'] | 108 | (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime'] |
109 | ); | 109 | ); |
110 | $historyEntry = $this->history->getHistory()[1]; | 110 | $historyEntry = $this->history->getHistory()[1]; |
111 | $this->assertEquals(\History::UPDATED, $historyEntry['event']); | 111 | $this->assertEquals(\Shaarli\History::UPDATED, $historyEntry['event']); |
112 | $this->assertTrue( | 112 | $this->assertTrue( |
113 | (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime'] | 113 | (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime'] |
114 | ); | 114 | ); |
@@ -137,7 +137,7 @@ class DeleteTagTest extends \PHPUnit_Framework_TestCase | |||
137 | $this->assertTrue($tags[strtolower($tagName)] > 0); | 137 | $this->assertTrue($tags[strtolower($tagName)] > 0); |
138 | 138 | ||
139 | $historyEntry = $this->history->getHistory()[0]; | 139 | $historyEntry = $this->history->getHistory()[0]; |
140 | $this->assertEquals(\History::UPDATED, $historyEntry['event']); | 140 | $this->assertEquals(\Shaarli\History::UPDATED, $historyEntry['event']); |
141 | $this->assertTrue( | 141 | $this->assertTrue( |
142 | (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime'] | 142 | (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime'] |
143 | ); | 143 | ); |
diff --git a/tests/api/controllers/tags/PutTagTest.php b/tests/api/controllers/tags/PutTagTest.php index 38017243..c45fa722 100644 --- a/tests/api/controllers/tags/PutTagTest.php +++ b/tests/api/controllers/tags/PutTagTest.php | |||
@@ -33,7 +33,7 @@ class PutTagTest extends \PHPUnit_Framework_TestCase | |||
33 | protected $refDB = null; | 33 | protected $refDB = null; |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * @var \History instance. | 36 | * @var \Shaarli\History instance. |
37 | */ | 37 | */ |
38 | protected $history; | 38 | protected $history; |
39 | 39 | ||
@@ -68,7 +68,7 @@ class PutTagTest extends \PHPUnit_Framework_TestCase | |||
68 | 68 | ||
69 | $refHistory = new \ReferenceHistory(); | 69 | $refHistory = new \ReferenceHistory(); |
70 | $refHistory->write(self::$testHistory); | 70 | $refHistory->write(self::$testHistory); |
71 | $this->history = new \History(self::$testHistory); | 71 | $this->history = new \Shaarli\History(self::$testHistory); |
72 | 72 | ||
73 | $this->container = new Container(); | 73 | $this->container = new Container(); |
74 | $this->container['conf'] = $this->conf; | 74 | $this->container['conf'] = $this->conf; |
@@ -113,12 +113,12 @@ class PutTagTest extends \PHPUnit_Framework_TestCase | |||
113 | $this->assertEquals(2, $tags[$newName]); | 113 | $this->assertEquals(2, $tags[$newName]); |
114 | 114 | ||
115 | $historyEntry = $this->history->getHistory()[0]; | 115 | $historyEntry = $this->history->getHistory()[0]; |
116 | $this->assertEquals(\History::UPDATED, $historyEntry['event']); | 116 | $this->assertEquals(\Shaarli\History::UPDATED, $historyEntry['event']); |
117 | $this->assertTrue( | 117 | $this->assertTrue( |
118 | (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime'] | 118 | (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime'] |
119 | ); | 119 | ); |
120 | $historyEntry = $this->history->getHistory()[1]; | 120 | $historyEntry = $this->history->getHistory()[1]; |
121 | $this->assertEquals(\History::UPDATED, $historyEntry['event']); | 121 | $this->assertEquals(\Shaarli\History::UPDATED, $historyEntry['event']); |
122 | $this->assertTrue( | 122 | $this->assertTrue( |
123 | (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime'] | 123 | (new \DateTime())->add(\DateInterval::createFromDateString('-5 seconds')) < $historyEntry['datetime'] |
124 | ); | 124 | ); |