diff options
Diffstat (limited to 'tests/api/controllers/tags/GetTagNameTest.php')
-rw-r--r-- | tests/api/controllers/tags/GetTagNameTest.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/api/controllers/tags/GetTagNameTest.php b/tests/api/controllers/tags/GetTagNameTest.php index b9a81f9b..a2fb89ab 100644 --- a/tests/api/controllers/tags/GetTagNameTest.php +++ b/tests/api/controllers/tags/GetTagNameTest.php | |||
@@ -53,7 +53,7 @@ class GetTagNameTest extends \PHPUnit\Framework\TestCase | |||
53 | /** | 53 | /** |
54 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. | 54 | * Before each test, instantiate a new Api with its config, plugins and bookmarks. |
55 | */ | 55 | */ |
56 | public function setUp() | 56 | protected function setUp(): void |
57 | { | 57 | { |
58 | $this->conf = new ConfigManager('tests/utils/config/configJson'); | 58 | $this->conf = new ConfigManager('tests/utils/config/configJson'); |
59 | $this->conf->set('resource.datastore', self::$testDatastore); | 59 | $this->conf->set('resource.datastore', self::$testDatastore); |
@@ -72,7 +72,7 @@ class GetTagNameTest extends \PHPUnit\Framework\TestCase | |||
72 | /** | 72 | /** |
73 | * After each test, remove the test datastore. | 73 | * After each test, remove the test datastore. |
74 | */ | 74 | */ |
75 | public function tearDown() | 75 | protected function tearDown(): void |
76 | { | 76 | { |
77 | @unlink(self::$testDatastore); | 77 | @unlink(self::$testDatastore); |
78 | } | 78 | } |
@@ -117,12 +117,12 @@ class GetTagNameTest extends \PHPUnit\Framework\TestCase | |||
117 | 117 | ||
118 | /** | 118 | /** |
119 | * Test basic getTag service: get non existent tag => ApiTagNotFoundException. | 119 | * Test basic getTag service: get non existent tag => ApiTagNotFoundException. |
120 | * | ||
121 | * @expectedException Shaarli\Api\Exceptions\ApiTagNotFoundException | ||
122 | * @expectedExceptionMessage Tag not found | ||
123 | */ | 120 | */ |
124 | public function testGetTag404() | 121 | public function testGetTag404() |
125 | { | 122 | { |
123 | $this->expectException(\Shaarli\Api\Exceptions\ApiTagNotFoundException::class); | ||
124 | $this->expectExceptionMessage('Tag not found'); | ||
125 | |||
126 | $env = Environment::mock([ | 126 | $env = Environment::mock([ |
127 | 'REQUEST_METHOD' => 'GET', | 127 | 'REQUEST_METHOD' => 'GET', |
128 | ]); | 128 | ]); |