diff options
Diffstat (limited to 'tests/api/controllers/links/GetLinkIdTest.php')
-rw-r--r-- | tests/api/controllers/links/GetLinkIdTest.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/api/controllers/links/GetLinkIdTest.php b/tests/api/controllers/links/GetLinkIdTest.php index 8bb81dc8..3a3aaa7b 100644 --- a/tests/api/controllers/links/GetLinkIdTest.php +++ b/tests/api/controllers/links/GetLinkIdTest.php | |||
@@ -55,7 +55,7 @@ class GetLinkIdTest extends \PHPUnit\Framework\TestCase | |||
55 | /** | 55 | /** |
56 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. | 56 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. |
57 | */ | 57 | */ |
58 | public function setUp() | 58 | protected function setUp(): void |
59 | { | 59 | { |
60 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 60 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
61 | $this->conf->set('resource.datastore', self::$testDatastore); | 61 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -74,7 +74,7 @@ class GetLinkIdTest extends \PHPUnit\Framework\TestCase | |||
74 | /** | 74 | /** |
75 | * After each test, remove the test datastore. | 75 | * After each test, remove the test datastore. |
76 | */ | 76 | */ |
77 | public function tearDown() | 77 | protected function tearDown(): void |
78 | { | 78 | { |
79 | @unlink(self::$testDatastore); | 79 | @unlink(self::$testDatastore); |
80 | } | 80 | } |
@@ -120,12 +120,12 @@ class GetLinkIdTest extends \PHPUnit\Framework\TestCase | |||
120 | 120 | ||
121 | /** | 121 | /** |
122 | * Test basic getLink service: get non existent link => ApiLinkNotFoundException. | 122 | * Test basic getLink service: get non existent link => ApiLinkNotFoundException. |
123 | * | ||
124 | * @expectedException Shaarli\Api\Exceptions\ApiLinkNotFoundException | ||
125 | * @expectedExceptionMessage Link not found | ||
126 | */ | 123 | */ |
127 | public function testGetLink404() | 124 | public function testGetLink404() |
128 | { | 125 | { |
126 | $this->expectException(\Shaarli\Api\Exceptions\ApiLinkNotFoundException::class); | ||
127 | $this->expectExceptionMessage('Link not found'); | ||
128 | |||
129 | $env = Environment::mock([ | 129 | $env = Environment::mock([ |
130 | 'REQUEST_METHOD' => 'GET', | 130 | 'REQUEST_METHOD' => 'GET', |
131 | ]); | 131 | ]); |