replace PHPUnit annotations with attributes (#5608)
This commit is contained in:
@@ -10,13 +10,13 @@
|
||||
namespace App\Tests\Configuration;
|
||||
|
||||
use App\Configuration\LdapConfiguration;
|
||||
use App\Configuration\SystemConfiguration;
|
||||
use App\Tests\Mocks\SystemConfigurationFactory;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\Configuration\LdapConfiguration
|
||||
* @covers \App\Configuration\SystemConfiguration
|
||||
*/
|
||||
#[CoversClass(LdapConfiguration::class)]
|
||||
#[CoversClass(SystemConfiguration::class)]
|
||||
class LdapConfigurationTest extends TestCase
|
||||
{
|
||||
protected function getSut(array $settings)
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
namespace App\Tests\Configuration;
|
||||
|
||||
use App\Configuration\LocaleService;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\Configuration\LocaleService
|
||||
*/
|
||||
#[CoversClass(LocaleService::class)]
|
||||
class LocaleServiceTest extends TestCase
|
||||
{
|
||||
protected function getSut(array $settings): LocaleService
|
||||
@@ -146,9 +146,7 @@ class LocaleServiceTest extends TestCase
|
||||
self::assertEquals('H:i:s', $sut->getTimeFormat('en'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider getNearestTranslationLocaleData
|
||||
*/
|
||||
#[DataProvider('getNearestTranslationLocaleData')]
|
||||
public function testGetNearestTranslationLocale(string $locale, string $expected): void
|
||||
{
|
||||
$sut = $this->getSut($this->getDefaultSettings());
|
||||
|
||||
@@ -10,11 +10,10 @@
|
||||
namespace App\Tests\Configuration;
|
||||
|
||||
use App\Configuration\MailConfiguration;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\Configuration\MailConfiguration
|
||||
*/
|
||||
#[CoversClass(MailConfiguration::class)]
|
||||
class MailConfigurationTest extends TestCase
|
||||
{
|
||||
public function testGetFromAddress(): void
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
namespace App\Tests\Configuration;
|
||||
|
||||
use App\Configuration\SamlConfiguration;
|
||||
use App\Configuration\SystemConfiguration;
|
||||
use App\Tests\Mocks\SystemConfigurationFactory;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\Configuration\SamlConfiguration
|
||||
* @covers \App\Configuration\SystemConfiguration
|
||||
*/
|
||||
#[CoversClass(SamlConfiguration::class)]
|
||||
#[CoversClass(SystemConfiguration::class)]
|
||||
class SamlConfigurationTest extends TestCase
|
||||
{
|
||||
protected function getSut(array $settings)
|
||||
|
||||
@@ -12,11 +12,10 @@ namespace App\Tests\Configuration;
|
||||
use App\Configuration\SystemConfiguration;
|
||||
use App\Entity\Configuration;
|
||||
use App\Tests\Mocks\SystemConfigurationFactory;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\Configuration\SystemConfiguration
|
||||
*/
|
||||
#[CoversClass(SystemConfiguration::class)]
|
||||
class SystemConfigurationTest extends TestCase
|
||||
{
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user