mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Migrate from PHPUnit annotations to native attributes
This commit is contained in:
@@ -5,6 +5,8 @@ declare(strict_types=1);
|
||||
namespace ShlinkioTest\Shlink\Rest;
|
||||
|
||||
use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Shlinkio\Shlink\Rest\ConfigProvider;
|
||||
|
||||
@@ -17,7 +19,7 @@ class ConfigProviderTest extends TestCase
|
||||
$this->configProvider = new ConfigProvider();
|
||||
}
|
||||
|
||||
/** @test */
|
||||
#[Test]
|
||||
public function properConfigIsReturned(): void
|
||||
{
|
||||
$config = ($this->configProvider)();
|
||||
@@ -30,10 +32,7 @@ class ConfigProviderTest extends TestCase
|
||||
self::assertArrayHasKey(ConfigAbstractFactory::class, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @dataProvider provideRoutesConfig
|
||||
*/
|
||||
#[Test, DataProvider('provideRoutesConfig')]
|
||||
public function routesAreProperlyPrefixed(array $routes, array $expected): void
|
||||
{
|
||||
self::assertEquals($expected, ConfigProvider::applyRoutesPrefix($routes));
|
||||
|
||||
Reference in New Issue
Block a user