mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Update to PHPUnit 10
This commit is contained in:
@@ -28,7 +28,7 @@ class AuthenticationTest extends ApiTestCase
|
||||
self::assertEquals('Invalid authorization', $payload['title']);
|
||||
}
|
||||
|
||||
public function provideApiVersions(): iterable
|
||||
public static function provideApiVersions(): iterable
|
||||
{
|
||||
yield 'version 1' => ['1', 'INVALID_AUTHORIZATION'];
|
||||
yield 'version 2' => ['2', 'INVALID_AUTHORIZATION'];
|
||||
@@ -60,7 +60,7 @@ class AuthenticationTest extends ApiTestCase
|
||||
self::assertEquals('Invalid API key', $payload['title']);
|
||||
}
|
||||
|
||||
public function provideInvalidApiKeys(): iterable
|
||||
public static function provideInvalidApiKeys(): iterable
|
||||
{
|
||||
yield 'key which does not exist' => ['invalid', '2', 'INVALID_API_KEY'];
|
||||
yield 'key which is expired' => ['expired_api_key', '2', 'INVALID_API_KEY'];
|
||||
|
||||
@@ -41,7 +41,7 @@ class CorsTest extends ApiTestCase
|
||||
self::assertFalse($resp->hasHeader('Access-Control-Allow-Headers'));
|
||||
}
|
||||
|
||||
public function provideOrigins(): iterable
|
||||
public static function provideOrigins(): iterable
|
||||
{
|
||||
yield 'foo.com' => ['foo.com', '/short-urls', 200];
|
||||
yield 'bar.io' => ['bar.io', '/foo/bar', 404];
|
||||
@@ -69,7 +69,7 @@ class CorsTest extends ApiTestCase
|
||||
self::assertEquals($allowedHeaders, $resp->getHeaderLine('Access-Control-Allow-Headers'));
|
||||
}
|
||||
|
||||
public function providePreflightEndpoints(): iterable
|
||||
public static function providePreflightEndpoints(): iterable
|
||||
{
|
||||
yield 'invalid route' => ['/foo/bar', 'GET,POST,PUT,PATCH,DELETE']; // TODO This won't work with multi-segment
|
||||
yield 'short URLs route' => ['/short-urls', 'GET,POST'];
|
||||
|
||||
Reference in New Issue
Block a user