replace PHPUnit annotations with attributes (#5608)

This commit is contained in:
Kevin Papst
2025-08-11 18:57:42 +02:00
committed by GitHub
parent 04331420ae
commit 24778d3ffb
599 changed files with 1778 additions and 2313 deletions

View File

@@ -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)

View File

@@ -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());

View File

@@ -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

View File

@@ -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)

View File

@@ -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
{
/**