diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-09-29 11:36:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-29 11:36:27 +0200 |
commit | 6cdca9562c7685e9a0eb77b51584d0cc458c44e0 (patch) | |
tree | 518de2057da549d0baa982c6aa689aa813377774 /tests/api/controllers/links/PutLinkTest.php | |
parent | d0ae1ba273b6decea8d35ef79bfabb055b0fb6df (diff) | |
parent | b1baca99f280570d0336b4d71ad1f9dca213a35b (diff) | |
download | Shaarli-6cdca9562c7685e9a0eb77b51584d0cc458c44e0.tar.gz Shaarli-6cdca9562c7685e9a0eb77b51584d0cc458c44e0.tar.zst Shaarli-6cdca9562c7685e9a0eb77b51584d0cc458c44e0.zip |
Merge pull request #1572 from ArthurHoaro/feature/php8
Diffstat (limited to 'tests/api/controllers/links/PutLinkTest.php')
-rw-r--r-- | tests/api/controllers/links/PutLinkTest.php | 10 |
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 | ]); |