aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/controllers/tags/DeleteTagTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/api/controllers/tags/DeleteTagTest.php')
-rw-r--r--tests/api/controllers/tags/DeleteTagTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/api/controllers/tags/DeleteTagTest.php b/tests/api/controllers/tags/DeleteTagTest.php
index c6748872..0d991b85 100644
--- a/tests/api/controllers/tags/DeleteTagTest.php
+++ b/tests/api/controllers/tags/DeleteTagTest.php
@@ -57,7 +57,7 @@ class DeleteTagTest extends \PHPUnit\Framework\TestCase
57 /** 57 /**
58 * Before each test, instantiate a new Api with its config, plugins and bookmarks. 58 * Before each test, instantiate a new Api with its config, plugins and bookmarks.
59 */ 59 */
60 public function setUp() 60 protected function setUp(): void
61 { 61 {
62 $this->conf = new ConfigManager('tests/utils/config/configJson'); 62 $this->conf = new ConfigManager('tests/utils/config/configJson');
63 $this->conf->set('resource.datastore', self::$testDatastore); 63 $this->conf->set('resource.datastore', self::$testDatastore);
@@ -79,7 +79,7 @@ class DeleteTagTest extends \PHPUnit\Framework\TestCase
79 /** 79 /**
80 * After each test, remove the test datastore. 80 * After each test, remove the test datastore.
81 */ 81 */
82 public function tearDown() 82 protected function tearDown(): void
83 { 83 {
84 @unlink(self::$testDatastore); 84 @unlink(self::$testDatastore);
85 @unlink(self::$testHistory); 85 @unlink(self::$testHistory);
@@ -150,12 +150,12 @@ class DeleteTagTest extends \PHPUnit\Framework\TestCase
150 150
151 /** 151 /**
152 * Test DELETE tag endpoint: reach not existing tag. 152 * Test DELETE tag endpoint: reach not existing tag.
153 *
154 * @expectedException Shaarli\Api\Exceptions\ApiTagNotFoundException
155 * @expectedExceptionMessage Tag not found
156 */ 153 */
157 public function testDeleteLink404() 154 public function testDeleteLink404()
158 { 155 {
156 $this->expectException(\Shaarli\Api\Exceptions\ApiTagNotFoundException::class);
157 $this->expectExceptionMessage('Tag not found');
158
159 $tagName = 'nopenope'; 159 $tagName = 'nopenope';
160 $tags = $this->bookmarkService->bookmarksCountPerTag(); 160 $tags = $this->bookmarkService->bookmarksCountPerTag();
161 $this->assertFalse(isset($tags[$tagName])); 161 $this->assertFalse(isset($tags[$tagName]));