diff options
Diffstat (limited to 'tests/api/controllers/links/DeleteLinkTest.php')
-rw-r--r-- | tests/api/controllers/links/DeleteLinkTest.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/api/controllers/links/DeleteLinkTest.php b/tests/api/controllers/links/DeleteLinkTest.php index 6c2b3698..bd8403cf 100644 --- a/tests/api/controllers/links/DeleteLinkTest.php +++ b/tests/api/controllers/links/DeleteLinkTest.php | |||
@@ -56,7 +56,7 @@ class DeleteLinkTest extends \PHPUnit\Framework\TestCase | |||
56 | /** | 56 | /** |
57 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. | 57 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. |
58 | */ | 58 | */ |
59 | public function setUp() | 59 | protected function setUp(): void |
60 | { | 60 | { |
61 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 61 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
62 | $this->conf->set('resource.datastore', self::$testDatastore); | 62 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -78,7 +78,7 @@ class DeleteLinkTest extends \PHPUnit\Framework\TestCase | |||
78 | /** | 78 | /** |
79 | * After each test, remove the test datastore. | 79 | * After each test, remove the test datastore. |
80 | */ | 80 | */ |
81 | public function tearDown() | 81 | protected function tearDown(): void |
82 | { | 82 | { |
83 | @unlink(self::$testDatastore); | 83 | @unlink(self::$testDatastore); |
84 | @unlink(self::$testHistory); | 84 | @unlink(self::$testHistory); |
@@ -113,11 +113,11 @@ class DeleteLinkTest extends \PHPUnit\Framework\TestCase | |||
113 | 113 | ||
114 | /** | 114 | /** |
115 | * Test DELETE link endpoint: reach not existing ID. | 115 | * Test DELETE link endpoint: reach not existing ID. |
116 | * | ||
117 | * @expectedException \Shaarli\Api\Exceptions\ApiLinkNotFoundException | ||
118 | */ | 116 | */ |
119 | public function testDeleteLink404() | 117 | public function testDeleteLink404() |
120 | { | 118 | { |
119 | $this->expectException(\Shaarli\Api\Exceptions\ApiLinkNotFoundException::class); | ||
120 | |||
121 | $id = -1; | 121 | $id = -1; |
122 | $this->assertFalse($this->bookmarkService->exists($id)); | 122 | $this->assertFalse($this->bookmarkService->exists($id)); |
123 | $env = Environment::mock([ | 123 | $env = Environment::mock([ |