aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/controllers/links/PutLinkTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/api/controllers/links/PutLinkTest.php')
-rw-r--r--tests/api/controllers/links/PutLinkTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/api/controllers/links/PutLinkTest.php b/tests/api/controllers/links/PutLinkTest.php
index 302cac0f..3d62a1b1 100644
--- a/tests/api/controllers/links/PutLinkTest.php
+++ b/tests/api/controllers/links/PutLinkTest.php
@@ -62,7 +62,7 @@ class PutLinkTest extends \PHPUnit\Framework\TestCase
62 /** 62 /**
63 * Before every test, instantiate a new Api with its config, plugins and bookmarks. 63 * Before every test, instantiate a new Api with its config, plugins and bookmarks.
64 */ 64 */
65 public function setUp() 65 protected function setUp(): void
66 { 66 {
67 $this->conf = new ConfigManager('tests/utils/config/configJson'); 67 $this->conf = new ConfigManager('tests/utils/config/configJson');
68 $this->conf->set('resource.datastore', self::$testDatastore); 68 $this->conf->set('resource.datastore', self::$testDatastore);
@@ -91,7 +91,7 @@ class PutLinkTest extends \PHPUnit\Framework\TestCase
91 /** 91 /**
92 * After every test, remove the test datastore. 92 * After every test, remove the test datastore.
93 */ 93 */
94 public function tearDown() 94 protected function tearDown(): void
95 { 95 {
96 @unlink(self::$testDatastore); 96 @unlink(self::$testDatastore);
97 @unlink(self::$testHistory); 97 @unlink(self::$testHistory);
@@ -218,12 +218,12 @@ class PutLinkTest extends \PHPUnit\Framework\TestCase
218 218
219 /** 219 /**
220 * Test link update on non existent link => ApiLinkNotFoundException. 220 * Test link update on non existent link => ApiLinkNotFoundException.
221 *
222 * @expectedException Shaarli\Api\Exceptions\ApiLinkNotFoundException
223 * @expectedExceptionMessage Link not found
224 */ 221 */
225 public function testGetLink404() 222 public function testGetLink404()
226 { 223 {
224 $this->expectException(\Shaarli\Api\Exceptions\ApiLinkNotFoundException::class);
225 $this->expectExceptionMessage('Link not found');
226
227 $env = Environment::mock([ 227 $env = Environment::mock([
228 'REQUEST_METHOD' => 'PUT', 228 'REQUEST_METHOD' => 'PUT',
229 ]); 229 ]);