diff options
Diffstat (limited to 'tests/api')
-rw-r--r-- | tests/api/controllers/GetLinksTest.php | 4 | ||||
-rw-r--r-- | tests/api/controllers/InfoTest.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/api/controllers/GetLinksTest.php b/tests/api/controllers/GetLinksTest.php index 84ae7f7a..4cb70224 100644 --- a/tests/api/controllers/GetLinksTest.php +++ b/tests/api/controllers/GetLinksTest.php | |||
@@ -95,7 +95,7 @@ class GetLinksTest extends \PHPUnit_Framework_TestCase | |||
95 | $this->assertEquals($this->refDB->countLinks(), count($data)); | 95 | $this->assertEquals($this->refDB->countLinks(), count($data)); |
96 | 96 | ||
97 | // Check order | 97 | // Check order |
98 | $order = [41, 8, 6, 7, 0, 1, 4, 42]; | 98 | $order = [41, 8, 6, 7, 0, 1, 9, 4, 42]; |
99 | $cpt = 0; | 99 | $cpt = 0; |
100 | foreach ($data as $link) { | 100 | foreach ($data as $link) { |
101 | $this->assertEquals(self::NB_FIELDS_LINK, count($link)); | 101 | $this->assertEquals(self::NB_FIELDS_LINK, count($link)); |
@@ -164,7 +164,7 @@ class GetLinksTest extends \PHPUnit_Framework_TestCase | |||
164 | $data = json_decode((string) $response->getBody(), true); | 164 | $data = json_decode((string) $response->getBody(), true); |
165 | $this->assertEquals($this->refDB->countLinks(), count($data)); | 165 | $this->assertEquals($this->refDB->countLinks(), count($data)); |
166 | // Check order | 166 | // Check order |
167 | $order = [41, 8, 6, 7, 0, 1, 4, 42]; | 167 | $order = [41, 8, 6, 7, 0, 1, 9, 4, 42]; |
168 | $cpt = 0; | 168 | $cpt = 0; |
169 | foreach ($data as $link) { | 169 | foreach ($data as $link) { |
170 | $this->assertEquals(self::NB_FIELDS_LINK, count($link)); | 170 | $this->assertEquals(self::NB_FIELDS_LINK, count($link)); |
diff --git a/tests/api/controllers/InfoTest.php b/tests/api/controllers/InfoTest.php index e85eb281..f7e63bfa 100644 --- a/tests/api/controllers/InfoTest.php +++ b/tests/api/controllers/InfoTest.php | |||
@@ -81,7 +81,7 @@ class InfoTest extends \PHPUnit_Framework_TestCase | |||
81 | $this->assertEquals(200, $response->getStatusCode()); | 81 | $this->assertEquals(200, $response->getStatusCode()); |
82 | $data = json_decode((string) $response->getBody(), true); | 82 | $data = json_decode((string) $response->getBody(), true); |
83 | 83 | ||
84 | $this->assertEquals(8, $data['global_counter']); | 84 | $this->assertEquals(\ReferenceLinkDB::$NB_LINKS_TOTAL, $data['global_counter']); |
85 | $this->assertEquals(2, $data['private_counter']); | 85 | $this->assertEquals(2, $data['private_counter']); |
86 | $this->assertEquals('Shaarli', $data['settings']['title']); | 86 | $this->assertEquals('Shaarli', $data['settings']['title']); |
87 | $this->assertEquals('?', $data['settings']['header_link']); | 87 | $this->assertEquals('?', $data['settings']['header_link']); |
@@ -104,7 +104,7 @@ class InfoTest extends \PHPUnit_Framework_TestCase | |||
104 | $this->assertEquals(200, $response->getStatusCode()); | 104 | $this->assertEquals(200, $response->getStatusCode()); |
105 | $data = json_decode((string) $response->getBody(), true); | 105 | $data = json_decode((string) $response->getBody(), true); |
106 | 106 | ||
107 | $this->assertEquals(8, $data['global_counter']); | 107 | $this->assertEquals(\ReferenceLinkDB::$NB_LINKS_TOTAL, $data['global_counter']); |
108 | $this->assertEquals(2, $data['private_counter']); | 108 | $this->assertEquals(2, $data['private_counter']); |
109 | $this->assertEquals($title, $data['settings']['title']); | 109 | $this->assertEquals($title, $data['settings']['title']); |
110 | $this->assertEquals($headerLink, $data['settings']['header_link']); | 110 | $this->assertEquals($headerLink, $data['settings']['header_link']); |