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,10 +10,9 @@
namespace App\Tests\Controller\Security;
use App\Tests\Controller\AbstractControllerBaseTestCase;
use PHPUnit\Framework\Attributes\Group;
/**
* @group integration
*/
#[Group('integration')]
class PasswordResetControllerTest extends AbstractControllerBaseTestCase
{
private function testResetActionWithDeactivatedFeature(string $route, string $method = 'GET'): void

View File

@@ -16,14 +16,14 @@ use App\DataFixtures\UserFixtures;
use App\Entity\User;
use App\Tests\Configuration\TestConfigLoader;
use App\Tests\Controller\AbstractControllerBaseTestCase;
use PHPUnit\Framework\Attributes\Group;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
/**
* This test makes sure the login and registration work as expected.
* The logic is located in the FOSUserBundle and already tested, but we use a different layout.
*
* @group integration
*/
#[Group('integration')]
class SecurityControllerTest extends AbstractControllerBaseTestCase
{
public function testRootUrlIsRedirectedToLogin(): void

View File

@@ -11,11 +11,11 @@ namespace App\Tests\Controller\Security;
use App\Entity\User;
use App\Tests\Controller\AbstractControllerBaseTestCase;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
/**
* @group integration
*/
#[Group('integration')]
class SelfRegistrationControllerTest extends AbstractControllerBaseTestCase
{
private function assertRegisterActionWithDeactivatedFeature(string $route): void
@@ -163,9 +163,7 @@ class SelfRegistrationControllerTest extends AbstractControllerBaseTestCase
self::assertTrue($client->getResponse()->isSuccessful());
}
/**
* @dataProvider getValidationTestData
*/
#[DataProvider('getValidationTestData')]
public function testRegisterActionWithValidationProblems(array $formData, array $validationFields): void
{
$client = self::createClient();