aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tests/api/controllers/tags/DeleteTagTest.php2
-rw-r--r--tests/api/controllers/tags/GetTagNameTest.php2
-rw-r--r--tests/api/controllers/tags/GetTagsTest.php12
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/api/controllers/tags/DeleteTagTest.php b/tests/api/controllers/tags/DeleteTagTest.php
index 7ba5a862..e0787ce2 100644
--- a/tests/api/controllers/tags/DeleteTagTest.php
+++ b/tests/api/controllers/tags/DeleteTagTest.php
@@ -144,7 +144,7 @@ class DeleteTagTest extends \PHPUnit_Framework_TestCase
144 } 144 }
145 145
146 /** 146 /**
147 * Test DELETE link endpoint: reach not existing ID. 147 * Test DELETE tag endpoint: reach not existing tag.
148 * 148 *
149 * @expectedException Shaarli\Api\Exceptions\ApiTagNotFoundException 149 * @expectedException Shaarli\Api\Exceptions\ApiTagNotFoundException
150 * @expectedExceptionMessage Tag not found 150 * @expectedExceptionMessage Tag not found
diff --git a/tests/api/controllers/tags/GetTagNameTest.php b/tests/api/controllers/tags/GetTagNameTest.php
index d60f5b38..afac228e 100644
--- a/tests/api/controllers/tags/GetTagNameTest.php
+++ b/tests/api/controllers/tags/GetTagNameTest.php
@@ -112,7 +112,7 @@ class GetTagNameTest extends \PHPUnit_Framework_TestCase
112 } 112 }
113 113
114 /** 114 /**
115 * Test basic getLink service: get non existent link => ApiLinkNotFoundException. 115 * Test basic getTag service: get non existent tag => ApiTagNotFoundException.
116 * 116 *
117 * @expectedException Shaarli\Api\Exceptions\ApiTagNotFoundException 117 * @expectedException Shaarli\Api\Exceptions\ApiTagNotFoundException
118 * @expectedExceptionMessage Tag not found 118 * @expectedExceptionMessage Tag not found
diff --git a/tests/api/controllers/tags/GetTagsTest.php b/tests/api/controllers/tags/GetTagsTest.php
index cf066bc3..3fab31b0 100644
--- a/tests/api/controllers/tags/GetTagsTest.php
+++ b/tests/api/controllers/tags/GetTagsTest.php
@@ -79,7 +79,7 @@ class GetTagsTest extends \PHPUnit_Framework_TestCase
79 } 79 }
80 80
81 /** 81 /**
82 * Test basic getLinks service: returns all tags. 82 * Test basic getTags service: returns all tags.
83 */ 83 */
84 public function testGetTagsAll() 84 public function testGetTagsAll()
85 { 85 {
@@ -102,12 +102,12 @@ class GetTagsTest extends \PHPUnit_Framework_TestCase
102 $this->assertEquals('cartoon', $data[1]['name']); 102 $this->assertEquals('cartoon', $data[1]['name']);
103 $this->assertEquals(3, $data[1]['occurrences']); 103 $this->assertEquals(3, $data[1]['occurrences']);
104 // Case insensitive 104 // Case insensitive
105 $this->assertEquals(self::NB_FIELDS_TAG, count($data[2])); 105 $this->assertEquals(self::NB_FIELDS_TAG, count($data[5]));
106 $this->assertEquals('sTuff', $data[2]['name']); 106 $this->assertEquals('sTuff', $data[5]['name']);
107 $this->assertEquals(2, $data[2]['occurrences']); 107 $this->assertEquals(2, $data[5]['occurrences']);
108 // End 108 // End
109 $this->assertEquals(self::NB_FIELDS_TAG, count($data[count($data) - 1])); 109 $this->assertEquals(self::NB_FIELDS_TAG, count($data[count($data) - 1]));
110 $this->assertEquals('ut', $data[count($data) - 1]['name']); 110 $this->assertEquals('w3c', $data[count($data) - 1]['name']);
111 $this->assertEquals(1, $data[count($data) - 1]['occurrences']); 111 $this->assertEquals(1, $data[count($data) - 1]['occurrences']);
112 } 112 }
113 113
@@ -181,7 +181,7 @@ class GetTagsTest extends \PHPUnit_Framework_TestCase
181 $data = json_decode((string) $response->getBody(), true); 181 $data = json_decode((string) $response->getBody(), true);
182 $this->assertEquals(count($tags), count($data)); 182 $this->assertEquals(count($tags), count($data));
183 $this->assertEquals(self::NB_FIELDS_TAG, count($data[0])); 183 $this->assertEquals(self::NB_FIELDS_TAG, count($data[0]));
184 $this->assertEquals('css', $data[0]['name']); 184 $this->assertEquals('Mercurial', $data[0]['name']);
185 $this->assertEquals(1, $data[0]['occurrences']); 185 $this->assertEquals(1, $data[0]['occurrences']);
186 } 186 }
187 187