aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/controllers/history
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/history
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/history')
-rw-r--r--tests/api/controllers/history/HistoryTest.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/api/controllers/history/HistoryTest.php b/tests/api/controllers/history/HistoryTest.php
index ff34e16d..24efee89 100644
--- a/tests/api/controllers/history/HistoryTest.php
+++ b/tests/api/controllers/history/HistoryTest.php
@@ -49,7 +49,7 @@ class HistoryTest extends \PHPUnit_Framework_TestCase
49 $this->container = new Container(); 49 $this->container = new Container();
50 $this->container['conf'] = $this->conf; 50 $this->container['conf'] = $this->conf;
51 $this->container['db'] = true; 51 $this->container['db'] = true;
52 $this->container['history'] = new \History(self::$testHistory); 52 $this->container['history'] = new \Shaarli\History(self::$testHistory);
53 53
54 $this->controller = new History($this->container); 54 $this->controller = new History($this->container);
55 } 55 }
@@ -78,35 +78,35 @@ class HistoryTest extends \PHPUnit_Framework_TestCase
78 78
79 $this->assertEquals($this->refHistory->count(), count($data)); 79 $this->assertEquals($this->refHistory->count(), count($data));
80 80
81 $this->assertEquals(\History::DELETED, $data[0]['event']); 81 $this->assertEquals(\Shaarli\History::DELETED, $data[0]['event']);
82 $this->assertEquals( 82 $this->assertEquals(
83 \DateTime::createFromFormat('Ymd_His', '20170303_121216')->format(\DateTime::ATOM), 83 \DateTime::createFromFormat('Ymd_His', '20170303_121216')->format(\DateTime::ATOM),
84 $data[0]['datetime'] 84 $data[0]['datetime']
85 ); 85 );
86 $this->assertEquals(124, $data[0]['id']); 86 $this->assertEquals(124, $data[0]['id']);
87 87
88 $this->assertEquals(\History::SETTINGS, $data[1]['event']); 88 $this->assertEquals(\Shaarli\History::SETTINGS, $data[1]['event']);
89 $this->assertEquals( 89 $this->assertEquals(
90 \DateTime::createFromFormat('Ymd_His', '20170302_121215')->format(\DateTime::ATOM), 90 \DateTime::createFromFormat('Ymd_His', '20170302_121215')->format(\DateTime::ATOM),
91 $data[1]['datetime'] 91 $data[1]['datetime']
92 ); 92 );
93 $this->assertNull($data[1]['id']); 93 $this->assertNull($data[1]['id']);
94 94
95 $this->assertEquals(\History::UPDATED, $data[2]['event']); 95 $this->assertEquals(\Shaarli\History::UPDATED, $data[2]['event']);
96 $this->assertEquals( 96 $this->assertEquals(
97 \DateTime::createFromFormat('Ymd_His', '20170301_121214')->format(\DateTime::ATOM), 97 \DateTime::createFromFormat('Ymd_His', '20170301_121214')->format(\DateTime::ATOM),
98 $data[2]['datetime'] 98 $data[2]['datetime']
99 ); 99 );
100 $this->assertEquals(123, $data[2]['id']); 100 $this->assertEquals(123, $data[2]['id']);
101 101
102 $this->assertEquals(\History::CREATED, $data[3]['event']); 102 $this->assertEquals(\Shaarli\History::CREATED, $data[3]['event']);
103 $this->assertEquals( 103 $this->assertEquals(
104 \DateTime::createFromFormat('Ymd_His', '20170201_121214')->format(\DateTime::ATOM), 104 \DateTime::createFromFormat('Ymd_His', '20170201_121214')->format(\DateTime::ATOM),
105 $data[3]['datetime'] 105 $data[3]['datetime']
106 ); 106 );
107 $this->assertEquals(124, $data[3]['id']); 107 $this->assertEquals(124, $data[3]['id']);
108 108
109 $this->assertEquals(\History::CREATED, $data[4]['event']); 109 $this->assertEquals(\Shaarli\History::CREATED, $data[4]['event']);
110 $this->assertEquals( 110 $this->assertEquals(
111 \DateTime::createFromFormat('Ymd_His', '20170101_121212')->format(\DateTime::ATOM), 111 \DateTime::createFromFormat('Ymd_His', '20170101_121212')->format(\DateTime::ATOM),
112 $data[4]['datetime'] 112 $data[4]['datetime']
@@ -131,7 +131,7 @@ class HistoryTest extends \PHPUnit_Framework_TestCase
131 131
132 $this->assertEquals(1, count($data)); 132 $this->assertEquals(1, count($data));
133 133
134 $this->assertEquals(\History::DELETED, $data[0]['event']); 134 $this->assertEquals(\Shaarli\History::DELETED, $data[0]['event']);
135 $this->assertEquals( 135 $this->assertEquals(
136 \DateTime::createFromFormat('Ymd_His', '20170303_121216')->format(\DateTime::ATOM), 136 \DateTime::createFromFormat('Ymd_His', '20170303_121216')->format(\DateTime::ATOM),
137 $data[0]['datetime'] 137 $data[0]['datetime']
@@ -156,7 +156,7 @@ class HistoryTest extends \PHPUnit_Framework_TestCase
156 156
157 $this->assertEquals(1, count($data)); 157 $this->assertEquals(1, count($data));
158 158
159 $this->assertEquals(\History::CREATED, $data[0]['event']); 159 $this->assertEquals(\Shaarli\History::CREATED, $data[0]['event']);
160 $this->assertEquals( 160 $this->assertEquals(
161 \DateTime::createFromFormat('Ymd_His', '20170101_121212')->format(\DateTime::ATOM), 161 \DateTime::createFromFormat('Ymd_His', '20170101_121212')->format(\DateTime::ATOM),
162 $data[0]['datetime'] 162 $data[0]['datetime']
@@ -181,7 +181,7 @@ class HistoryTest extends \PHPUnit_Framework_TestCase
181 181
182 $this->assertEquals(1, count($data)); 182 $this->assertEquals(1, count($data));
183 183
184 $this->assertEquals(\History::DELETED, $data[0]['event']); 184 $this->assertEquals(\Shaarli\History::DELETED, $data[0]['event']);
185 $this->assertEquals( 185 $this->assertEquals(
186 \DateTime::createFromFormat('Ymd_His', '20170303_121216')->format(\DateTime::ATOM), 186 \DateTime::createFromFormat('Ymd_His', '20170303_121216')->format(\DateTime::ATOM),
187 $data[0]['datetime'] 187 $data[0]['datetime']
@@ -206,7 +206,7 @@ class HistoryTest extends \PHPUnit_Framework_TestCase
206 206
207 $this->assertEquals(1, count($data)); 207 $this->assertEquals(1, count($data));
208 208
209 $this->assertEquals(\History::SETTINGS, $data[0]['event']); 209 $this->assertEquals(\Shaarli\History::SETTINGS, $data[0]['event']);
210 $this->assertEquals( 210 $this->assertEquals(
211 \DateTime::createFromFormat('Ymd_His', '20170302_121215')->format(\DateTime::ATOM), 211 \DateTime::createFromFormat('Ymd_His', '20170302_121215')->format(\DateTime::ATOM),
212 $data[0]['datetime'] 212 $data[0]['datetime']