diff options
Diffstat (limited to 'core/tests')
157 files changed, 576 insertions, 369 deletions
diff --git a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php b/core/tests/Drupal/BuildTests/QuickStart/QuickStartTest.php index c6fc8f18aa5..fbd0473b562 100644 --- a/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php +++ b/core/tests/Drupal/BuildTests/QuickStart/QuickStartTest.php @@ -2,14 +2,18 @@ declare(strict_types=1); -namespace Drupal\Tests\Core\Command; +namespace Drupal\BuildTests\QuickStart; use Drupal\sqlite\Driver\Database\sqlite\Install\Tasks; +use Drupal\BuildTests\Framework\BuildTestBase; use Drupal\Core\Test\TestDatabase; use Drupal\Tests\BrowserTestBase; use GuzzleHttp\Client; use GuzzleHttp\Cookie\CookieJar; -use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\PreserveGlobalState; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; use Symfony\Component\Process\PhpExecutableFinder; use Symfony\Component\Process\Process; @@ -18,15 +22,12 @@ use Symfony\Component\Process\Process; * * These tests are run in a separate process because they load Drupal code via * an include. - * - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @requires extension pdo_sqlite - * - * @group Command - * @group #slow */ -class QuickStartTest extends TestCase { +#[Group('Command')] +#[PreserveGlobalState(FALSE)] +#[RequiresPhpExtension('pdo_sqlite')] +#[RunTestsInSeparateProcesses] +class QuickStartTest extends BuildTestBase { /** * The PHP executable path. diff --git a/core/tests/Drupal/Tests/Core/Recipe/RecipeQuickStartTest.php b/core/tests/Drupal/BuildTests/QuickStart/RecipeQuickStartTest.php index 65bedfff3d0..07d907bb8d0 100644 --- a/core/tests/Drupal/Tests/Core/Recipe/RecipeQuickStartTest.php +++ b/core/tests/Drupal/BuildTests/QuickStart/RecipeQuickStartTest.php @@ -2,14 +2,18 @@ declare(strict_types=1); -namespace Drupal\Tests\Core\Recipe; +namespace Drupal\BuildTests\QuickStart; use Drupal\sqlite\Driver\Database\sqlite\Install\Tasks; +use Drupal\BuildTests\Framework\BuildTestBase; use Drupal\Core\Test\TestDatabase; use Drupal\Tests\BrowserTestBase; use GuzzleHttp\Client; use GuzzleHttp\Cookie\CookieJar; -use PHPUnit\Framework\TestCase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\PreserveGlobalState; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; use Symfony\Component\Process\PhpExecutableFinder; use Symfony\Component\Process\Process; @@ -18,16 +22,13 @@ use Symfony\Component\Process\Process; * * These tests are run in a separate process because they load Drupal code via * an include. - * - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled - * @requires extension pdo_sqlite - * - * @group Command - * @group Recipe - * @group #slow */ -class RecipeQuickStartTest extends TestCase { +#[Group('Command')] +#[Group('Recipe')] +#[PreserveGlobalState(FALSE)] +#[RequiresPhpExtension('pdo_sqlite')] +#[RunTestsInSeparateProcesses] +class RecipeQuickStartTest extends BuildTestBase { /** * The PHP executable path. diff --git a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php index 284a3e35fa9..49c7d6987f7 100644 --- a/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php +++ b/core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php @@ -167,6 +167,12 @@ JS; JS; $expected = '<div class="div-wrapper-forever"></div>'; $this->assertInsert('empty', $expected, $custom_wrapper_new_content); + + // Checking inserting table elements. + $expected = '<tr><td>table-row</td></tr>'; + $this->drupalGet('ajax-test/insert-table-wrapper'); + $this->clickLink('Link table-row'); + $this->assertWaitPageContains('<div class="ajax-target-wrapper"><table><tbody id="ajax-target">' . $expected . '</tbody></table></div>'); } /** diff --git a/core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationTest.php b/core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationTest.php index 96980a2c605..580e7ad1a13 100644 --- a/core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationTest.php +++ b/core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationTest.php @@ -6,14 +6,13 @@ namespace Drupal\FunctionalTests\Asset; use Drupal\Component\Utility\UrlHelper; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore abcdefghijklmnop - /** * Tests asset aggregation. - * - * @group asset */ +#[Group('asset')] class AssetOptimizationTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationUmamiTest.php b/core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationUmamiTest.php index 5951ac94531..214ecd80053 100644 --- a/core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationUmamiTest.php +++ b/core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationUmamiTest.php @@ -4,16 +4,17 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Asset; +use PHPUnit\Framework\Attributes\Group; + /** * Tests asset aggregation with the Umami install profile. * * Umami includes several core modules as well as the Claro theme, this * results in a more complex asset dependency tree to test than the testing * profile. - * - * @group asset - * @group #slow */ +#[Group('asset')] +#[Group('#slow')] class AssetOptimizationUmamiTest extends AssetOptimizationTest { /** diff --git a/core/tests/Drupal/FunctionalTests/Asset/UnversionedAssetTest.php b/core/tests/Drupal/FunctionalTests/Asset/UnversionedAssetTest.php index a2f84544ff5..00e05246700 100644 --- a/core/tests/Drupal/FunctionalTests/Asset/UnversionedAssetTest.php +++ b/core/tests/Drupal/FunctionalTests/Asset/UnversionedAssetTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Asset; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests asset aggregation. - * - * @group asset */ +#[Group('asset')] class UnversionedAssetTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php b/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php index aac21dcff87..248c70e2965 100644 --- a/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php +++ b/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalTests\Bootstrap; use Drupal\Component\Render\FormattableMarkup; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests kernel panic when things are really messed up. - * - * @group system */ +#[Group('system')] class UncaughtExceptionTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php b/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php index b38a93c2565..6bf8bad3ec4 100644 --- a/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php +++ b/core/tests/Drupal/FunctionalTests/Breadcrumb/Breadcrumb404Test.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalTests\Breadcrumb; use Drupal\Tests\block\Traits\BlockCreationTrait; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the breadcrumb of 404 pages. - * - * @group breadcrumb */ +#[Group('breadcrumb')] class Breadcrumb404Test extends BrowserTestBase { use BlockCreationTrait; diff --git a/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php b/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php index cf48655458b..6e8720a8d40 100644 --- a/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php +++ b/core/tests/Drupal/FunctionalTests/BrowserTestBaseUserAgentTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests BrowserTestBase functionality. - * - * @group browsertestbase */ +#[Group('browsertestbase')] class BrowserTestBaseUserAgentTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Components/ComponentRenderTest.php b/core/tests/Drupal/FunctionalTests/Components/ComponentRenderTest.php index 963661a0cc8..e379f4252ef 100644 --- a/core/tests/Drupal/FunctionalTests/Components/ComponentRenderTest.php +++ b/core/tests/Drupal/FunctionalTests/Components/ComponentRenderTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Components; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the correct rendering of components. - * - * @group sdc */ +#[Group('sdc')] class ComponentRenderTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php b/core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php index d42b356c641..7f191e478fe 100644 --- a/core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php +++ b/core/tests/Drupal/FunctionalTests/Core/Config/SchemaConfigListenerTest.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalTests\Core\Config; use Drupal\Tests\BrowserTestBase; use Drupal\Tests\Traits\Core\Config\SchemaConfigListenerTestTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests the functionality of ConfigSchemaChecker in BrowserTestBase tests. - * - * @group config */ +#[Group('config')] class SchemaConfigListenerTest extends BrowserTestBase { use SchemaConfigListenerTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Core/Container/ServiceDeprecationTest.php b/core/tests/Drupal/FunctionalTests/Core/Container/ServiceDeprecationTest.php index d441c23d307..4394363c159 100644 --- a/core/tests/Drupal/FunctionalTests/Core/Container/ServiceDeprecationTest.php +++ b/core/tests/Drupal/FunctionalTests/Core/Container/ServiceDeprecationTest.php @@ -4,7 +4,11 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Core\Container; +use Drupal\Component\DependencyInjection\Container; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; /** * Test whether deprecation notices are triggered via \Drupal::service(). @@ -12,12 +16,10 @@ use Drupal\Tests\BrowserTestBase; * Note: this test must be a BrowserTestBase so the container is properly * compiled. The container in KernelTestBase tests is always an instance of * \Drupal\Core\DependencyInjection\ContainerBuilder. - * - * @group Container - * @group legacy - * - * @coversDefaultClass \Drupal\Component\DependencyInjection\Container */ +#[CoversClass(Container::class)] +#[Group('Container')] +#[IgnoreDeprecations] class ServiceDeprecationTest extends BrowserTestBase { /** @@ -31,7 +33,9 @@ class ServiceDeprecationTest extends BrowserTestBase { protected $defaultTheme = 'stark'; /** - * @covers ::get + * Tests get deprecated. + * + * @legacy-covers ::get */ public function testGetDeprecated(): void { $this->expectDeprecation('The "deprecation_test.service" service is deprecated in drupal:9.0.0 and is removed from drupal:20.0.0. This is a test.'); diff --git a/core/tests/Drupal/FunctionalTests/Core/Recipe/RecipeCommandTest.php b/core/tests/Drupal/FunctionalTests/Core/Recipe/RecipeCommandTest.php index 882658558f7..d2e1684d999 100644 --- a/core/tests/Drupal/FunctionalTests/Core/Recipe/RecipeCommandTest.php +++ b/core/tests/Drupal/FunctionalTests/Core/Recipe/RecipeCommandTest.php @@ -6,16 +6,18 @@ namespace Drupal\FunctionalTests\Core\Recipe; use Drupal\contact\Entity\ContactForm; use Drupal\Core\Config\Checkpoint\Checkpoint; +use Drupal\Core\Recipe\RecipeCommand; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; /** * Tests recipe command. * * BrowserTestBase is used for a proper Drupal install. - * - * @coversDefaultClass \Drupal\Core\Recipe\RecipeCommand - * @group Recipe */ +#[CoversClass(RecipeCommand::class)] +#[Group('Recipe')] class RecipeCommandTest extends BrowserTestBase { use RecipeTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Core/Recipe/RollbackTest.php b/core/tests/Drupal/FunctionalTests/Core/Recipe/RollbackTest.php index f279b988c6f..2ba1abff2d2 100644 --- a/core/tests/Drupal/FunctionalTests/Core/Recipe/RollbackTest.php +++ b/core/tests/Drupal/FunctionalTests/Core/Recipe/RollbackTest.php @@ -8,10 +8,13 @@ use Drupal\Core\Config\Checkpoint\Checkpoint; use Drupal\Core\Datetime\Entity\DateFormat; use Drupal\Core\Recipe\Recipe; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\TestWith; /** - * @group Recipe + * Tests Rollback. */ +#[Group('Recipe')] class RollbackTest extends BrowserTestBase { use RecipeTestTrait; @@ -39,10 +42,11 @@ class RollbackTest extends BrowserTestBase { ]; /** - * @testWith ["invalid_config", "core.date_format.invalid"] - * ["recipe_depend_on_invalid", "core.date_format.invalid"] - * ["recipe_depend_on_invalid_config_and_valid_modules", "core.date_format.invalid"] - */ + * Tests rollback for invalid config. + */ + #[TestWith(["invalid_config", "core.date_format.invalid"])] + #[TestWith(["recipe_depend_on_invalid", "core.date_format.invalid"])] + #[TestWith(["recipe_depend_on_invalid_config_and_valid_modules", "core.date_format.invalid"])] public function testRollbackForInvalidConfig(string $recipe_fixture, string $expected_invalid_config_name): void { $expected_core_extension_modules = $this->config('core.extension')->get('module'); diff --git a/core/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeInstallTest.php b/core/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeInstallTest.php index 04e771f8a65..630b62e1e9e 100644 --- a/core/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeInstallTest.php +++ b/core/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeInstallTest.php @@ -8,15 +8,15 @@ use Drupal\contact\Entity\ContactForm; use Drupal\FunctionalTests\Installer\InstallerTestBase; use Drupal\shortcut\Entity\Shortcut; use Drupal\Tests\standard\Traits\StandardTestTrait; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Yaml\Yaml as SymfonyYaml; /** * Tests installing the Standard recipe via the installer. - * - * @group #slow - * @group Recipe */ +#[Group('#slow')] +#[Group('Recipe')] class StandardRecipeInstallTest extends InstallerTestBase { use StandardTestTrait { testStandard as doTestStandard; diff --git a/core/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeTest.php b/core/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeTest.php index 68a793f8771..b1651400689 100644 --- a/core/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeTest.php +++ b/core/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeTest.php @@ -8,13 +8,13 @@ use Drupal\Core\Extension\ModuleExtensionList; use Drupal\shortcut\Entity\Shortcut; use Drupal\Tests\standard\Functional\StandardTest; use Drupal\user\RoleInterface; +use PHPUnit\Framework\Attributes\Group; /** * Tests Standard recipe installation expectations. - * - * @group #slow - * @group Recipe */ +#[Group('#slow')] +#[Group('Recipe')] class StandardRecipeTest extends StandardTest { use RecipeTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php b/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php index 387250f43e3..01ca5484867 100644 --- a/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php +++ b/core/tests/Drupal/FunctionalTests/Core/Test/ModuleInstallBatchTest.php @@ -6,16 +6,16 @@ namespace Drupal\FunctionalTests\Core\Test; use Drupal\entity_test\Entity\EntityTest; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests batch operations during tests execution. * * This demonstrates that a batch will be successfully executed during module * installation when running tests. - * - * @group Test - * @group FunctionalTestSetupTrait */ +#[Group('Test')] +#[Group('FunctionalTestSetupTrait')] class ModuleInstallBatchTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php b/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php index cf4eab8d67e..aec48cfacfb 100644 --- a/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php +++ b/core/tests/Drupal/FunctionalTests/Core/Test/PhpUnitBridgeTest.php @@ -6,13 +6,14 @@ namespace Drupal\FunctionalTests\Core\Test; use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; /** * Tests Drupal's extension to manage code deprecation. - * - * @group Test - * @group legacy */ +#[Group('Test')] +#[IgnoreDeprecations] class PhpUnitBridgeTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php b/core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php index 57b4191a7fd..bf3319c93bc 100644 --- a/core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php +++ b/core/tests/Drupal/FunctionalTests/Datetime/TimestampAgoFormatterTest.php @@ -9,12 +9,12 @@ use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the functionality of TimestampAgoFormatter core field formatter. - * - * @group field */ +#[Group('field')] class TimestampAgoFormatterTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php b/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php index 09ce9544c30..564b3a9bbd4 100644 --- a/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php +++ b/core/tests/Drupal/FunctionalTests/Datetime/TimestampTest.php @@ -11,12 +11,12 @@ use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the functionality of Timestamp core field UI. - * - * @group field */ +#[Group('field')] class TimestampTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/DefaultContent/ContentImportTest.php b/core/tests/Drupal/FunctionalTests/DefaultContent/ContentImportTest.php index f280ad493a5..3a876401d42 100644 --- a/core/tests/Drupal/FunctionalTests/DefaultContent/ContentImportTest.php +++ b/core/tests/Drupal/FunctionalTests/DefaultContent/ContentImportTest.php @@ -8,12 +8,12 @@ use ColinODell\PsrTestLogger\TestLogger; use Drupal\block_content\BlockContentInterface; use Drupal\block_content\Entity\BlockContentType; use Drupal\Component\Serialization\Yaml; -use Drupal\Core\DefaultContent\PreImportEvent; use Drupal\Core\DefaultContent\Existing; use Drupal\Core\DefaultContent\Finder; use Drupal\Core\DefaultContent\Importer; use Drupal\Core\DefaultContent\ImportException; use Drupal\Core\DefaultContent\InvalidEntityException; +use Drupal\Core\DefaultContent\PreImportEvent; use Drupal\Core\Entity\EntityDisplayRepositoryInterface; use Drupal\Core\Entity\EntityRepositoryInterface; use Drupal\Core\File\FileExists; @@ -36,15 +36,19 @@ use Drupal\Tests\media\Traits\MediaTypeCreationTrait; use Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait; use Drupal\user\UserInterface; use Drupal\workspaces\Entity\Workspace; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Psr\Log\LogLevel; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** - * @covers \Drupal\Core\DefaultContent\Importer - * @group DefaultContent - * @group Recipe - * @group #slow + * Tests Content Import. + * + * @legacy-covers \Drupal\Core\DefaultContent\Importer */ +#[Group('DefaultContent')] +#[Group('Recipe')] +#[Group('#slow')] class ContentImportTest extends BrowserTestBase { use EntityReferenceFieldCreationTrait; @@ -146,8 +150,9 @@ class ContentImportTest extends BrowserTestBase { } /** - * @dataProvider providerImportEntityThatAlreadyExists - */ + * Tests import entity that already exists. + */ + #[DataProvider('providerImportEntityThatAlreadyExists')] public function testImportEntityThatAlreadyExists(Existing $existing): void { $this->drupalCreateUser(values: ['uuid' => '94503467-be7f-406c-9795-fc25baa22203']); diff --git a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest.php b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest.php index 62f25442865..b5bfb865c68 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest.php @@ -8,12 +8,12 @@ use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the correct mapping of user input on the correct field delta elements. - * - * @group Entity */ +#[Group('Entity')] class ContentEntityFormCorrectUserInputMappingOnFieldDeltaElementsTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php index 7108b212bf1..9d40cbe111c 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/ContentEntityFormFieldValidationFilteringTest.php @@ -9,12 +9,12 @@ use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\Tests\BrowserTestBase; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests field validation filtering on content entity forms. - * - * @group Entity */ +#[Group('Entity')] class ContentEntityFormFieldValidationFilteringTest extends BrowserTestBase { use TestFileCreationTrait; diff --git a/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php b/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php index f65f4d2ddb3..b51d4042a96 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/DeleteMultipleFormTest.php @@ -9,14 +9,16 @@ use Drupal\entity_test\Entity\EntityTestMulRevPub; use Drupal\entity_test\Entity\EntityTestRev; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\PreserveGlobalState; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Tests the delete multiple confirmation form. - * - * @group Entity - * @runTestsInSeparateProcesses - * @preserveGlobalState disabled */ +#[Group('Entity')] +#[PreserveGlobalState(FALSE)] +#[RunTestsInSeparateProcesses] class DeleteMultipleFormTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php b/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php index 85a2fbcd3fe..88c3f9ed314 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/EntityBundleListCacheTest.php @@ -9,12 +9,12 @@ use Drupal\entity_test\Entity\EntityTestBundle; use Drupal\entity_test\Entity\EntityTestWithBundle; use Drupal\Tests\BrowserTestBase; use Drupal\Tests\system\Functional\Cache\AssertPageCacheContextsAndTagsTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests that bundle tags are invalidated when entities change. - * - * @group Entity */ +#[Group('Entity')] class EntityBundleListCacheTest extends BrowserTestBase { use AssertPageCacheContextsAndTagsTrait; diff --git a/core/tests/Drupal/FunctionalTests/Entity/EntityUuidIdTest.php b/core/tests/Drupal/FunctionalTests/Entity/EntityUuidIdTest.php index d6bdff7c090..51494401479 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/EntityUuidIdTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/EntityUuidIdTest.php @@ -7,12 +7,12 @@ namespace Drupal\FunctionalTests\Entity; use Drupal\Component\Uuid\Uuid; use Drupal\Tests\BrowserTestBase; use Drupal\Tests\content_translation\Traits\ContentTranslationTestTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests that an entity with a UUID as ID can be managed. - * - * @group Entity */ +#[Group('Entity')] class EntityUuidIdTest extends BrowserTestBase { use ContentTranslationTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php b/core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php index e5901e52fa4..a2e750974ae 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php @@ -4,18 +4,20 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Entity; +use Drupal\Core\Entity\Form\RevisionDeleteForm; use Drupal\Core\Entity\RevisionLogInterface; use Drupal\entity_test\Entity\EntityTestRev; use Drupal\entity_test\Entity\EntityTestRevPub; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; /** * Tests deleting a revision with revision delete form. - * - * @group Entity - * @group #slow - * @coversDefaultClass \Drupal\Core\Entity\Form\RevisionDeleteForm */ +#[CoversClass(RevisionDeleteForm::class)] +#[Group('Entity')] +#[Group('#slow')] class RevisionDeleteFormTest extends BrowserTestBase { /** @@ -59,7 +61,7 @@ class RevisionDeleteFormTest extends BrowserTestBase { * @param string $expectedQuestion * The expected question/page title. * - * @covers ::getQuestion + * @legacy-covers ::getQuestion */ protected function doTestPageTitle(string $entityTypeId, string $expectedQuestion): void { /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */ @@ -105,7 +107,7 @@ class RevisionDeleteFormTest extends BrowserTestBase { /** * Test cannot delete latest revision. * - * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess + * @legacy-covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess */ public function testAccessDeleteLatestDefault(): void { /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ @@ -132,7 +134,7 @@ class RevisionDeleteFormTest extends BrowserTestBase { /** * Ensure that forward revision can be deleted. * - * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess + * @legacy-covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess */ protected function testAccessDeleteLatestForwardRevision(): void { /** @var \Drupal\entity_test\Entity\EntityTestRevPub $entity */ @@ -158,7 +160,7 @@ class RevisionDeleteFormTest extends BrowserTestBase { /** * Test cannot delete default revision. * - * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess + * @legacy-covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess */ protected function testAccessDeleteDefault(): void { /** @var \Drupal\entity_test\Entity\EntityTestRevPub $entity */ @@ -193,7 +195,7 @@ class RevisionDeleteFormTest extends BrowserTestBase { /** * Test can delete non-latest revision. * - * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess + * @legacy-covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess */ protected function testAccessDeleteNonLatest(): void { /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ @@ -244,7 +246,7 @@ class RevisionDeleteFormTest extends BrowserTestBase { * @param string|int $expectedDestination * Expected destination after deletion. * - * @covers ::submitForm + * @legacy-covers ::submitForm */ protected function doTestSubmitForm(array $permissions, string $entityTypeId, string $entityLabel, int $totalRevisions, array $expectedLog, string $expectedMessage, $expectedDestination): void { if (count($permissions) > 0) { diff --git a/core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php b/core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php index 8ca59b6100e..61b08c8f439 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php @@ -4,19 +4,22 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Entity; +use Drupal\Core\Entity\Form\RevisionRevertForm; use Drupal\Core\Entity\RevisionLogInterface; use Drupal\entity_test\Entity\EntityTestRev; use Drupal\entity_test\Entity\EntityTestRevPub; use Drupal\entity_test_revlog\Entity\EntityTestWithRevisionLog; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests reverting a revision with revision revert form. - * - * @group Entity - * @group #slow - * @coversDefaultClass \Drupal\Core\Entity\Form\RevisionRevertForm */ +#[CoversClass(RevisionRevertForm::class)] +#[Group('Entity')] +#[Group('#slow')] class RevisionRevertFormTest extends BrowserTestBase { /** @@ -107,7 +110,7 @@ class RevisionRevertFormTest extends BrowserTestBase { /** * Test cannot revert latest default revision. * - * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess + * @legacy-covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess */ protected function testAccessRevertLatestDefault(): void { /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ @@ -126,7 +129,7 @@ class RevisionRevertFormTest extends BrowserTestBase { /** * Ensures that forward revisions can be reverted. * - * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess + * @legacy-covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess */ protected function testAccessRevertLatestForwardRevision(): void { /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ @@ -150,7 +153,7 @@ class RevisionRevertFormTest extends BrowserTestBase { /** * Test can revert non-latest revision. * - * @covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess + * @legacy-covers \Drupal\Core\Entity\EntityAccessControlHandler::checkAccess */ protected function testAccessRevertNonLatest(): void { /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ @@ -188,9 +191,9 @@ class RevisionRevertFormTest extends BrowserTestBase { * @param string $expectedDestination * Expected destination after deletion. * - * @covers ::submitForm - * @dataProvider providerSubmitForm + * @legacy-covers ::submitForm */ + #[DataProvider('providerSubmitForm')] public function testSubmitForm(array $permissions, string $entityTypeId, string $entityLabel, array $expectedLog, string $expectedMessage, string $expectedDestination): void { if (count($permissions) > 0) { $this->drupalLogin($this->createUser($permissions)); @@ -302,7 +305,7 @@ class RevisionRevertFormTest extends BrowserTestBase { /** * Tests the revert process. * - * @covers ::prepareRevision + * @legacy-covers ::prepareRevision */ protected function testPrepareRevision(): void { $user = $this->createUser(); diff --git a/core/tests/Drupal/FunctionalTests/Entity/RevisionRouteProviderTest.php b/core/tests/Drupal/FunctionalTests/Entity/RevisionRouteProviderTest.php index e59fe25e25e..6843860b1b8 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/RevisionRouteProviderTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/RevisionRouteProviderTest.php @@ -4,15 +4,17 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Entity; +use Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider; use Drupal\entity_test\Entity\EntityTestRev; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; /** * Tests revision route provider. - * - * @group Entity - * @coversDefaultClass \Drupal\Core\Entity\Routing\RevisionHtmlRouteProvider */ +#[CoversClass(RevisionHtmlRouteProvider::class)] +#[Group('Entity')] class RevisionRouteProviderTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTest.php b/core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTest.php index a5b9e966766..67b99d3072a 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTest.php @@ -8,14 +8,15 @@ use Drupal\Core\Entity\Controller\VersionHistoryController; use Drupal\entity_test\Entity\EntityTestRev; use Drupal\entity_test_revlog\Entity\EntityTestWithRevisionLog; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; /** * Tests version history page. - * - * @group Entity - * @group #slow - * @coversDefaultClass \Drupal\Core\Entity\Controller\VersionHistoryController */ +#[CoversClass(VersionHistoryController::class)] +#[Group('Entity')] +#[Group('#slow')] class RevisionVersionHistoryTest extends BrowserTestBase { /** @@ -66,7 +67,7 @@ class RevisionVersionHistoryTest extends BrowserTestBase { /** * Test current revision is indicated. * - * @covers \Drupal\Core\Entity\Controller\VersionHistoryController::revisionOverview + * @legacy-covers \Drupal\Core\Entity\Controller\VersionHistoryController::revisionOverview */ public function testCurrentRevision(): void { /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ @@ -95,7 +96,7 @@ class RevisionVersionHistoryTest extends BrowserTestBase { /** * Test description with entity implementing revision log. * - * @covers ::getRevisionDescription + * @legacy-covers ::getRevisionDescription */ public function testDescriptionRevLog(): void { /** @var \Drupal\entity_test_revlog\Entity\EntityTestWithRevisionLog $entity */ @@ -114,7 +115,7 @@ class RevisionVersionHistoryTest extends BrowserTestBase { /** * Test description with entity implementing revision log, with empty values. * - * @covers ::getRevisionDescription + * @legacy-covers ::getRevisionDescription */ public function testDescriptionRevLogNullValues(): void { $entity = EntityTestWithRevisionLog::create(['type' => 'entity_test_revlog']); @@ -133,7 +134,7 @@ class RevisionVersionHistoryTest extends BrowserTestBase { /** * Test description with entity, without revision log, no label access. * - * @covers ::getRevisionDescription + * @legacy-covers ::getRevisionDescription */ public function testDescriptionNoRevLogNoLabelAccess(): void { /** @var \Drupal\entity_test\Entity\EntityTestRev $entity */ @@ -149,7 +150,7 @@ class RevisionVersionHistoryTest extends BrowserTestBase { /** * Test description with entity, without revision log, with label access. * - * @covers ::getRevisionDescription + * @legacy-covers ::getRevisionDescription */ public function testDescriptionNoRevLogWithLabelAccess(): void { // Permission grants 'view label' access. @@ -168,7 +169,7 @@ class RevisionVersionHistoryTest extends BrowserTestBase { /** * Test revision link, without access to revision page. * - * @covers ::getRevisionDescription + * @legacy-covers ::getRevisionDescription */ public function testDescriptionLinkNoAccess(): void { /** @var \Drupal\entity_test_revlog\Entity\EntityTestWithRevisionLog $entity */ @@ -187,7 +188,7 @@ class RevisionVersionHistoryTest extends BrowserTestBase { * Test two revisions. Usually the latest revision only checks canonical * route access, whereas all others will check individual revision access. * - * @covers ::getRevisionDescription + * @legacy-covers ::getRevisionDescription */ public function testDescriptionLinkWithAccess(): void { /** @var \Drupal\entity_test_revlog\Entity\EntityTestWithRevisionLog $entity */ @@ -216,7 +217,7 @@ class RevisionVersionHistoryTest extends BrowserTestBase { /** * Test revision log message if supported, and HTML tags are stripped. * - * @covers ::getRevisionDescription + * @legacy-covers ::getRevisionDescription */ public function testDescriptionRevisionLogMessage(): void { /** @var \Drupal\entity_test_revlog\Entity\EntityTestWithRevisionLog $entity */ @@ -233,7 +234,7 @@ class RevisionVersionHistoryTest extends BrowserTestBase { /** * Test revert operation. * - * @covers ::buildRevertRevisionLink + * @legacy-covers ::buildRevertRevisionLink */ public function testOperationRevertRevision(): void { /** @var \Drupal\entity_test_revlog\Entity\EntityTestWithRevisionLog $entity */ @@ -273,7 +274,7 @@ class RevisionVersionHistoryTest extends BrowserTestBase { /** * Test delete operation. * - * @covers ::buildDeleteRevisionLink + * @legacy-covers ::buildDeleteRevisionLink */ public function testOperationDeleteRevision(): void { /** @var \Drupal\entity_test_revlog\Entity\EntityTestWithRevisionLog $entity */ diff --git a/core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTranslatableTest.php b/core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTranslatableTest.php index 2625feb5ec3..7146a489a3d 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTranslatableTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTranslatableTest.php @@ -4,16 +4,18 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Entity; +use Drupal\Core\Entity\Controller\VersionHistoryController; use Drupal\entity_test_revlog\Entity\EntityTestMulWithRevisionLog; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; /** * Tests version history page with translations. - * - * @group Entity - * @coversDefaultClass \Drupal\Core\Entity\Controller\VersionHistoryController */ +#[CoversClass(VersionHistoryController::class)] +#[Group('Entity')] final class RevisionVersionHistoryTranslatableTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Entity/RevisionViewTest.php b/core/tests/Drupal/FunctionalTests/Entity/RevisionViewTest.php index e39c1f36f60..bc219184c8b 100644 --- a/core/tests/Drupal/FunctionalTests/Entity/RevisionViewTest.php +++ b/core/tests/Drupal/FunctionalTests/Entity/RevisionViewTest.php @@ -4,17 +4,20 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Entity; +use Drupal\Core\Entity\Controller\EntityRevisionViewController; use Drupal\Core\Entity\RevisionLogInterface; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests revision view page. - * - * @group Entity - * @coversDefaultClass \Drupal\Core\Entity\Controller\EntityRevisionViewController */ +#[CoversClass(EntityRevisionViewController::class)] +#[Group('Entity')] class RevisionViewTest extends BrowserTestBase { /** @@ -48,10 +51,9 @@ class RevisionViewTest extends BrowserTestBase { * @param string $expectedPageTitle * Expected page title. * - * @covers ::__invoke - * - * @dataProvider providerRevisionPage + * @legacy-covers ::__invoke */ + #[DataProvider('providerRevisionPage')] public function testRevisionPage(string $entityTypeId, string $expectedPageTitle): void { /** @var \Drupal\Core\Entity\RevisionableStorageInterface $storage */ $storage = \Drupal::entityTypeManager()->getStorage($entityTypeId); diff --git a/core/tests/Drupal/FunctionalTests/EventSubscriber/Fast404Test.php b/core/tests/Drupal/FunctionalTests/EventSubscriber/Fast404Test.php index 77c9b0f00b7..3ca22f19760 100644 --- a/core/tests/Drupal/FunctionalTests/EventSubscriber/Fast404Test.php +++ b/core/tests/Drupal/FunctionalTests/EventSubscriber/Fast404Test.php @@ -6,14 +6,14 @@ namespace Drupal\FunctionalTests\EventSubscriber; use Drupal\file\Entity\File; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the fast 404 functionality. * - * @group EventSubscriber - * * @see \Drupal\Core\EventSubscriber\Fast404ExceptionHtmlSubscriber */ +#[Group('EventSubscriber')] class Fast404Test extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest.php b/core/tests/Drupal/FunctionalTests/ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest.php index fd7bfeecd38..e18073c3150 100644 --- a/core/tests/Drupal/FunctionalTests/ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest.php +++ b/core/tests/Drupal/FunctionalTests/ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest.php @@ -7,10 +7,12 @@ namespace Drupal\FunctionalTests; use Drupal\Core\Database\Connection; use Drupal\Core\Database\Database; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** - * @group Database + * Tests Existing Drupal8Style Database Connection In Settings Php. */ +#[Group('Database')] class ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/FolderTest.php b/core/tests/Drupal/FunctionalTests/FolderTest.php index 267b59260e0..ea9cef18f9b 100644 --- a/core/tests/Drupal/FunctionalTests/FolderTest.php +++ b/core/tests/Drupal/FunctionalTests/FolderTest.php @@ -5,14 +5,14 @@ declare(strict_types=1); namespace Drupal\FunctionalTests; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests BrowserTestBase's treatment of hook_install() during setup. * * Image module is used for test. - * - * @group browsertestbase */ +#[Group('browsertestbase')] class FolderTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/GetTestMethodCallerExtendsTest.php b/core/tests/Drupal/FunctionalTests/GetTestMethodCallerExtendsTest.php index f65c4951c0d..2fcaeb8471c 100644 --- a/core/tests/Drupal/FunctionalTests/GetTestMethodCallerExtendsTest.php +++ b/core/tests/Drupal/FunctionalTests/GetTestMethodCallerExtendsTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Test for BrowserTestBase::getTestMethodCaller() in child classes. - * - * @group browsertestbase */ +#[Group('browsertestbase')] class GetTestMethodCallerExtendsTest extends GetTestMethodCallerTest { /** diff --git a/core/tests/Drupal/FunctionalTests/GetTestMethodCallerTest.php b/core/tests/Drupal/FunctionalTests/GetTestMethodCallerTest.php index 3966ebfe387..5e432156fe9 100644 --- a/core/tests/Drupal/FunctionalTests/GetTestMethodCallerTest.php +++ b/core/tests/Drupal/FunctionalTests/GetTestMethodCallerTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Explicit test for BrowserTestBase::getTestMethodCaller(). - * - * @group browsertestbase */ +#[Group('browsertestbase')] class GetTestMethodCallerTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/HttpKernel/ContentLengthTest.php b/core/tests/Drupal/FunctionalTests/HttpKernel/ContentLengthTest.php index 20145dc3711..c6a5ecca25a 100644 --- a/core/tests/Drupal/FunctionalTests/HttpKernel/ContentLengthTest.php +++ b/core/tests/Drupal/FunctionalTests/HttpKernel/ContentLengthTest.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalTests\HttpKernel; use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests Content-Length set by Drupal. - * - * @group Http */ +#[Group('Http')] class ContentLengthTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php index bae54ab1afc..f8c9662286e 100644 --- a/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php +++ b/core/tests/Drupal/FunctionalTests/HttpKernel/CorsIntegrationTest.php @@ -6,6 +6,7 @@ namespace Drupal\FunctionalTests\HttpKernel; use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests CORS provided by Drupal. @@ -13,9 +14,8 @@ use Drupal\Tests\BrowserTestBase; * @see sites/default/default.services.yml * @see \Asm89\Stack\Cors * @see \Asm89\Stack\CorsService - * - * @group Http */ +#[Group('Http')] class CorsIntegrationTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/HttpKernel/DestructableServiceTest.php b/core/tests/Drupal/FunctionalTests/HttpKernel/DestructableServiceTest.php index 317fd82cfa9..63fda6236ef 100644 --- a/core/tests/Drupal/FunctionalTests/HttpKernel/DestructableServiceTest.php +++ b/core/tests/Drupal/FunctionalTests/HttpKernel/DestructableServiceTest.php @@ -7,14 +7,14 @@ namespace Drupal\FunctionalTests\HttpKernel; use Drupal\Core\File\FileSystemInterface; use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests invocation of services performing deferred tasks after response flush. * * @see \Drupal\Core\DestructableInterface - * - * @group Http */ +#[Group('Http')] class DestructableServiceTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php b/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php index 491ffcc6866..e0fc902f851 100644 --- a/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php +++ b/core/tests/Drupal/FunctionalTests/Image/ToolkitSetupFormTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Image; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests image toolkit setup form. - * - * @group Image */ +#[Group('Image')] class ToolkitSetupFormTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php index 79b9209e848..e15c9bb1bb4 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileExistingSettingsTest.php @@ -7,13 +7,13 @@ namespace Drupal\FunctionalTests\Installer; use Drupal\Component\Serialization\Yaml; use Drupal\Core\Database\Database; use Drupal\Core\DrupalKernel; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\Request; /** * Tests distribution profile support with existing settings. - * - * @group Installer */ +#[Group('Installer')] class DistributionProfileExistingSettingsTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php index 76868fb17f8..566d701347b 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Serialization\Yaml; +use PHPUnit\Framework\Attributes\Group; /** * Tests distribution profile support. - * - * @group Installer */ +#[Group('Installer')] class DistributionProfileTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php index 67bdc2bb70a..204a27acab1 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationQueryTest.php @@ -5,14 +5,14 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Serialization\Yaml; +use PHPUnit\Framework\Attributes\Group; /** * Tests distribution profile support with a 'langcode' query string. * - * @group Installer - * * @see \Drupal\FunctionalTests\Installer\DistributionProfileTranslationTest */ +#[Group('Installer')] class DistributionProfileTranslationQueryTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php index 75db313b14b..35e7a824eb6 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DistributionProfileTranslationTest.php @@ -5,14 +5,14 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Serialization\Yaml; +use PHPUnit\Framework\Attributes\Group; /** * Tests distribution profile support. * - * @group Installer - * * @see \Drupal\FunctionalTests\Installer\DistributionProfileTest */ +#[Group('Installer')] class DistributionProfileTranslationTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php index 22165f456c4..380f73d70f8 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Serialization\Yaml; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests drupal_flush_all_caches() during an install. - * - * @group Installer */ +#[Group('Installer')] class DrupalFlushAllCachesInInstallerTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallProfileDependenciesTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallProfileDependenciesTest.php index 8b2b3e727b8..421f9962574 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallProfileDependenciesTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallProfileDependenciesTest.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Extension\ModuleUninstallValidatorException; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests that an install profile can require modules. - * - * @group Installer */ +#[Group('Installer')] class InstallProfileDependenciesTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallProfileUninstallTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallProfileUninstallTest.php index 57720e6b20b..88bcf1fb50d 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallProfileUninstallTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallProfileUninstallTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests that an install profile can be uninstalled. - * - * @group Extension */ +#[Group('Extension')] class InstallProfileUninstallTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php index 696a5f7a9d0..c748723bce1 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Database\Database; +use PHPUnit\Framework\Attributes\Group; /** * Tests the installer with incorrect connection info in settings.php. - * - * @group Installer */ +#[Group('Installer')] class InstallerBrokenDatabaseCredentialsTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php index b766e8e6c8e..d1841b4d26a 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Database\Database; +use PHPUnit\Framework\Attributes\Group; /** * Tests the installer with incorrect connection info in settings.php. - * - * @group Installer */ +#[Group('Installer')] class InstallerBrokenDatabasePortSettingsTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php index 11803c1b83c..57ce1650865 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Component\Utility\Crypt; +use PHPUnit\Framework\Attributes\Group; /** * Tests installation when a config_sync_directory is set up but does not exist. - * - * @group Installer */ +#[Group('Installer')] class InstallerConfigDirectorySetNoDirectoryErrorTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php index fc01c2eb9a9..8b306a0a196 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Component\Utility\Crypt; +use PHPUnit\Framework\Attributes\Group; /** * Tests the installer when a custom config directory set up but does not exist. - * - * @group Installer */ +#[Group('Installer')] class InstallerConfigDirectorySetNoDirectoryTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php index f97483dd610..94779d138d0 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Database\Database; +use PHPUnit\Framework\Attributes\Group; /** * Tests the installer with database errors. - * - * @group Installer */ +#[Group('Installer')] class InstallerDatabaseErrorMessagesTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php index 2ccd47a0274..7522d6fa1c7 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Tests the installer with empty settings file. - * - * @group Installer */ +#[Group('Installer')] class InstallerEmptySettingsTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php index 879039b291c..3b6e8d0c686 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Database\Database; +use PHPUnit\Framework\Attributes\Group; /** * Tests the installer with broken database connection info in settings.php. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingBrokenDatabaseSettingsTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php index 89f7b491547..49e2e635bb3 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Tests installation when a config_sync_directory exists and is set up. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingConfigDirectoryTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigExistingSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigExistingSettingsTest.php index a5553bd1fb4..2d8c1d26ce7 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigExistingSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigExistingSettingsTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Database\Database; +use PHPUnit\Framework\Attributes\Group; /** * Verifies that installing from existing configuration works. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingConfigExistingSettingsTest extends InstallerExistingConfigTest { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php index 8125da5bca0..4d2a5db3450 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Logger\RfcLogLevel; +use PHPUnit\Framework\Attributes\Group; /** * Verifies that installing from existing configuration works. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingConfigMultilingualTest extends InstallerConfigDirectoryTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php index 4461c06b210..b8a5db5d14a 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Verifies that profiles invalid config can not be installed. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingConfigNoConfigTest extends InstallerConfigDirectoryTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoProfileTest.php index ea4f70e3a6c..ba1bcc4edd3 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoProfileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoProfileTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Verifies that installing from existing configuration without a profile works. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingConfigNoProfileTest extends InstallerExistingConfigTest { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php index 4022db2fcef..8bbc87e2791 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Testing installing from config without system.site. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingConfigNoSystemSiteTest extends InstallerConfigDirectoryTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstallTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstallTest.php index 692a9af8730..800492459e0 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstallTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstallTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Verifies that profiles with hook_install() can't be installed from config. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingConfigProfileHookInstallTest extends InstallerConfigDirectoryTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php index 4d1bf067425..a158388b22d 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php @@ -5,14 +5,13 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Component\Serialization\Yaml; +use PHPUnit\Framework\Attributes\Group; // cSpell:ignore Anónimo Aplicar - /** * Verifies that installing from existing configuration works. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingConfigSyncDirectoryMultilingualTest extends InstallerConfigDirectoryTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstallTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstallTest.php index dc0cfc5c365..84bcce25c13 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstallTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstallTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Verifies that profiles with hook_install() can't be installed from config. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingConfigSyncDirectoryProfileHookInstallTest extends InstallerConfigDirectoryTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php index 7f9a0ecf60d..5fd1e3d8ca9 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Verifies that installing from existing configuration works. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingConfigSyncDirectoryProfileMismatchTest extends InstallerConfigDirectoryTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTest.php index 487fa70ac1d..1acfdccf2b4 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTest.php @@ -4,13 +4,13 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; -// cspell:ignore nmsgid nmsgstr enregistrer +use PHPUnit\Framework\Attributes\Group; +// cspell:ignore nmsgid nmsgstr enregistrer /** * Verifies that installing from existing configuration works. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingConfigTest extends InstallerConfigDirectoryTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php index 8717249fb67..3657826d1a0 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Database\Database; +use PHPUnit\Framework\Attributes\Group; /** * Tests installation with database information in an existing settings file. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingDatabaseSettingsTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php index a932da76d33..c4eeca55eca 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Tests the installer with an existing Drupal installation. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingInstallationTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php index 3c075895734..7249b6dace6 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php @@ -4,15 +4,15 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; -use Drupal\Core\DrupalKernel; use Drupal\Core\Database\Database; +use Drupal\Core\DrupalKernel; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\Request; /** * Tests the installer with an existing settings file but no install profile. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingSettingsNoProfileTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php index 3958b82396a..5be72fe0a9e 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php @@ -6,13 +6,13 @@ namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Database\Database; use Drupal\Core\DrupalKernel; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\Request; /** * Tests the installer with an existing settings file. - * - * @group Installer */ +#[Group('Installer')] class InstallerExistingSettingsTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php index 4e401add43a..4ef3cc94ffd 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php @@ -4,13 +4,13 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; -// cspell:ignore nmsgid nmsgstr +use PHPUnit\Framework\Attributes\Group; +// cspell:ignore nmsgid nmsgstr /** * Verifies that the early installer uses the correct language direction. - * - * @group Installer */ +#[Group('Installer')] class InstallerLanguageDirectionTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php index 0d12f466fda..21b47fd32bc 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php @@ -5,14 +5,13 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Language\LanguageManager; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore xoxo - /** * Verifies that the installer language list uses local and remote languages. - * - * @group Installer */ +#[Group('Installer')] class InstallerLanguagePageTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php index 994ac39d270..dcb80c6cb5f 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php @@ -5,15 +5,14 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Database\Database; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore drupaldriver testdriverdatabasedrivertestmysql // cspell:ignore testdriverdatabasedrivertestpgsql - /** * Tests the interactive installer. - * - * @group Installer */ +#[Group('Installer')] class InstallerNonDefaultDatabaseDriverTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php index 5bf54301e2c..aab5e4a749a 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Serialization\Yaml; +use PHPUnit\Framework\Attributes\Group; /** * Tests installing a profile with non-English language and no locale module. - * - * @group Installer */ +#[Group('Installer')] class InstallerNonEnglishProfileWithoutLocaleModuleTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php index 697bf2773ac..994303dc1c8 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php @@ -7,12 +7,12 @@ namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Routing\RoutingEvents; use Drupal\Core\Test\PerformanceTestRecorder; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the interactive installer. - * - * @group Installer */ +#[Group('Installer')] class InstallerPerformanceTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerPostInstallTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerPostInstallTest.php index f527f52ece0..80d8abf2d5b 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerPostInstallTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerPostInstallTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Tests re-visiting the installer after a successful installation. - * - * @group Installer */ +#[Group('Installer')] class InstallerPostInstallTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php index f2d498d8d4e..e11a5deea6e 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Tests that an install profile can implement hook_requirements(). - * - * @group Installer */ +#[Group('Installer')] class InstallerProfileRequirementsTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php index e0c70d436fc..4485729e6ef 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerRouterTest.php @@ -7,12 +7,12 @@ namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Routing\RoutingEvents; use Drupal\Core\Serialization\Yaml; use Drupal\Core\Test\PerformanceTestRecorder; +use PHPUnit\Framework\Attributes\Group; /** * Tests router rebuilding during installation. - * - * @group Installer */ +#[Group('Installer')] class InstallerRouterTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerSiteConfigProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerSiteConfigProfileTest.php index 7da75723dd4..f6b48610a41 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerSiteConfigProfileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerSiteConfigProfileTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Verifies that the installer uses the profile's site configuration. - * - * @group Installer */ +#[Group('Installer')] class InstallerSiteConfigProfileTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php index ef2d4063370..905492e3987 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerSkipPermissionHardeningTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Verifies that the installer skipped permission hardening. - * - * @group Installer */ +#[Group('Installer')] class InstallerSkipPermissionHardeningTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php index 4f2dc621a2c..748dac5d5e1 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTest.php @@ -5,17 +5,16 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Database\Database; +use Drupal\Core\Extension\ModuleUninstallValidatorException; use Drupal\Core\Routing\RoutingEvents; use Drupal\Core\Test\PerformanceTestRecorder; -use Drupal\Core\Extension\ModuleUninstallValidatorException; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore drupalmysqldriverdatabasemysql drupalpgsqldriverdatabasepgsql - /** * Tests the interactive installer. - * - * @group Installer */ +#[Group('Installer')] class InstallerTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerThemesBlocksProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerThemesBlocksProfileTest.php index 116028ecd4c..fb89144d775 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerThemesBlocksProfileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerThemesBlocksProfileTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\block\Entity\Block; +use PHPUnit\Framework\Attributes\Group; /** * Verifies that the installer does not generate theme blocks. - * - * @group Installer */ +#[Group('Installer')] class InstallerThemesBlocksProfileTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationExistingFileTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationExistingFileTest.php index 23633165b5c..35f480db1b1 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationExistingFileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationExistingFileTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Tests translation files for multiple languages get imported during install. - * - * @group Installer */ +#[Group('Installer')] class InstallerTranslationExistingFileTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php index 052ae5e01f0..1eeb3113073 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageForeignTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Tests translation files for multiple languages get imported during install. - * - * @group Installer */ +#[Group('Installer')] class InstallerTranslationMultipleLanguageForeignTest extends InstallerTranslationMultipleLanguageTest { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageKeepEnglishTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageKeepEnglishTest.php index 3d83bf8b4ca..1f39175707e 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageKeepEnglishTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageKeepEnglishTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Tests that keeping English in a foreign language install works. - * - * @group Installer */ +#[Group('Installer')] class InstallerTranslationMultipleLanguageKeepEnglishTest extends InstallerTranslationMultipleLanguageForeignTest { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php index 89039734192..1f5e80e05dd 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php @@ -6,14 +6,13 @@ namespace Drupal\FunctionalTests\Installer; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore montag - /** * Tests translation files for multiple languages get imported during install. - * - * @group Installer */ +#[Group('Installer')] class InstallerTranslationMultipleLanguageNonInteractiveTest extends BrowserTestBase { use StringTranslationTrait; diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php index b7cf373a332..37db8c5e829 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Tests translation files for multiple languages get imported during install. - * - * @group Installer */ +#[Group('Installer')] class InstallerTranslationMultipleLanguageTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationNonStandardFilenamesTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationNonStandardFilenamesTest.php index f8be98693f5..6a0d0c2f50f 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationNonStandardFilenamesTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationNonStandardFilenamesTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests non-standard named translation files get imported during install. - * - * @group Installer */ +#[Group('Installer')] class InstallerTranslationNonStandardFilenamesTest extends InstallerTranslationMultipleLanguageNonInteractiveTest { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php index 97976121601..76b237f192a 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php @@ -4,13 +4,14 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Installs Drupal in German and checks resulting site. * - * @group Installer - * * @see \Drupal\FunctionalTests\Installer\InstallerTranslationTest */ +#[Group('Installer')] class InstallerTranslationQueryTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php index df41e7bf510..0060152639a 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php @@ -7,12 +7,12 @@ namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Database\Database; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\user\Entity\User; +use PHPUnit\Framework\Attributes\Group; /** * Installs Drupal in German and checks resulting site. - * - * @group Installer */ +#[Group('Installer')] class InstallerTranslationTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/MinimalInstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/MinimalInstallerTest.php index 3513ff168de..862d4fcffd3 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/MinimalInstallerTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/MinimalInstallerTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\KernelTests\AssertConfigTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests the interactive installer installing the minimal profile. - * - * @group Installer */ +#[Group('Installer')] class MinimalInstallerTest extends ConfigAfterInstallerTestBase { use AssertConfigTrait; diff --git a/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php index 60dc1ffdae0..1b8f5f98775 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/MultipleDistributionsProfileTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Component\Serialization\Yaml; +use PHPUnit\Framework\Attributes\Group; /** * Tests multiple distribution profile support. - * - * @group Installer */ +#[Group('Installer')] class MultipleDistributionsProfileTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/ProfileRequirementsTest.php b/core/tests/Drupal/FunctionalTests/Installer/ProfileRequirementsTest.php index 6a6e556944b..8b81d3f8a7c 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/ProfileRequirementsTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/ProfileRequirementsTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Tests installing a profile that implements InstallRequirementsInterface. - * - * @group Installer */ +#[Group('Installer')] class ProfileRequirementsTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php b/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php index 35761c78069..9542b3a5418 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/SingleVisibleProfileTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Serialization\Yaml; +use PHPUnit\Framework\Attributes\Group; /** * Tests distribution profile support. - * - * @group Installer */ +#[Group('Installer')] class SingleVisibleProfileTest extends InstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php b/core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php index fa513876d49..bc3d4bbe791 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/SiteNameTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests that the site name can be set during a non-interactive installation. - * - * @group Installer */ +#[Group('Installer')] class SiteNameTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/SiteSettingsFormTest.php b/core/tests/Drupal/FunctionalTests/Installer/SiteSettingsFormTest.php index 404fd7c8ac2..9f802b6235f 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/SiteSettingsFormTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/SiteSettingsFormTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the extension of the site settings form. - * - * @group Installer */ +#[Group('Installer')] class SiteSettingsFormTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php b/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php index 20714d76e9c..4edee593381 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; +use PHPUnit\Framework\Attributes\Group; + /** * Tests the interactive installer installing the standard profile. - * - * @group Installer */ +#[Group('Installer')] class StandardInstallerTest extends ConfigAfterInstallerTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/SuperUserAccessInstallTest.php b/core/tests/Drupal/FunctionalTests/Installer/SuperUserAccessInstallTest.php index 527a4326d26..b63c5d41893 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/SuperUserAccessInstallTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/SuperUserAccessInstallTest.php @@ -6,12 +6,13 @@ namespace Drupal\FunctionalTests\Installer; use Drupal\Core\Serialization\Yaml; use Drupal\user\Entity\User; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests superuser access and the installer. - * - * @group Installer */ +#[Group('Installer')] class SuperUserAccessInstallTest extends InstallerTestBase { /** @@ -70,9 +71,8 @@ class SuperUserAccessInstallTest extends InstallerTestBase { /** * Confirms that the installation succeeded. - * - * @dataProvider getInstallTests */ + #[DataProvider('getInstallTests')] public function testInstalled(bool $expected_runtime_has_permission, bool $expected_no_access_message, array $expected_roles, string $install_code, bool $super_user_policy): void { $user = User::load(1); $this->assertSame($expected_runtime_has_permission, $user->hasPermission('administer software updates')); diff --git a/core/tests/Drupal/FunctionalTests/Installer/TestingProfileHooksTest.php b/core/tests/Drupal/FunctionalTests/Installer/TestingProfileHooksTest.php index 573f1d8c93b..28d79c572dd 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/TestingProfileHooksTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/TestingProfileHooksTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests installing the Testing profile with update notifications on. - * - * @group Installer */ +#[Group('Installer')] class TestingProfileHooksTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Installer/TestingProfileInstallTest.php b/core/tests/Drupal/FunctionalTests/Installer/TestingProfileInstallTest.php index e58cac9ad7e..9daa074367a 100644 --- a/core/tests/Drupal/FunctionalTests/Installer/TestingProfileInstallTest.php +++ b/core/tests/Drupal/FunctionalTests/Installer/TestingProfileInstallTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Installer; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests installing the Testing profile with update notifications on. - * - * @group Installer */ +#[Group('Installer')] class TestingProfileInstallTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php b/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php index 3b1c44a70a4..cd67a8b18d8 100644 --- a/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php +++ b/core/tests/Drupal/FunctionalTests/Libraries/JqueryUiLibraryAssetsTest.php @@ -5,13 +5,15 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Libraries; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; /** * Tests the loading of jQuery UI CSS and JS assets. - * - * @group libraries - * @group legacy */ +#[Group('libraries')] +#[IgnoreDeprecations] class JqueryUiLibraryAssetsTest extends BrowserTestBase { /** @@ -211,9 +213,8 @@ class JqueryUiLibraryAssetsTest extends BrowserTestBase { /** * Confirms that jQuery UI assets load on the page in the configured order. - * - * @dataProvider providerTestAssetLoading */ + #[DataProvider('providerTestAssetLoading')] public function testLibraryAssetLoadingOrder($library, array $expected_css, array $expected_js): void { $this->drupalGet("jqueryui_library_assets_test/$library"); $this->assertSession()->statusCodeEquals(200); @@ -292,9 +293,8 @@ class JqueryUiLibraryAssetsTest extends BrowserTestBase { * The jQuery UI CSS files expected to load. * @param string[] $expected_js * The jQuery UI JavaScript files expected to load. - * - * @dataProvider providerTestAssetLoading */ + #[DataProvider('providerTestAssetLoading')] public function testAssetLoadingUnchanged($library, array $expected_css, array $expected_js): void { $this->drupalGet("jqueryui_library_assets_test/$library"); $this->assertSession()->statusCodeEquals(200); diff --git a/core/tests/Drupal/FunctionalTests/Libraries/ManyAssetsLoadOrderTest.php b/core/tests/Drupal/FunctionalTests/Libraries/ManyAssetsLoadOrderTest.php index c128587612f..94909bed298 100644 --- a/core/tests/Drupal/FunctionalTests/Libraries/ManyAssetsLoadOrderTest.php +++ b/core/tests/Drupal/FunctionalTests/Libraries/ManyAssetsLoadOrderTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Libraries; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the loading of many weighted assets. - * - * @group libraries */ +#[Group('libraries')] class ManyAssetsLoadOrderTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/MailCaptureTest.php b/core/tests/Drupal/FunctionalTests/MailCaptureTest.php index bea51a83645..aac0a675a56 100644 --- a/core/tests/Drupal/FunctionalTests/MailCaptureTest.php +++ b/core/tests/Drupal/FunctionalTests/MailCaptureTest.php @@ -4,17 +4,17 @@ declare(strict_types=1); namespace Drupal\FunctionalTests; -use Drupal\Tests\BrowserTestBase; use Drupal\Core\Test\AssertMailTrait; +use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the collection of emails during testing. * * The test mail collector, test.mail.collector, intercepts any email sent * during a test so it does not leave the test server. - * - * @group browsertestbase */ +#[Group('browsertestbase')] class MailCaptureTest extends BrowserTestBase { use AssertMailTrait { getMails as drupalGetMails; diff --git a/core/tests/Drupal/FunctionalTests/Menu/MenuActiveTrail403Test.php b/core/tests/Drupal/FunctionalTests/Menu/MenuActiveTrail403Test.php index 2a7e446e348..8269f607e92 100644 --- a/core/tests/Drupal/FunctionalTests/Menu/MenuActiveTrail403Test.php +++ b/core/tests/Drupal/FunctionalTests/Menu/MenuActiveTrail403Test.php @@ -7,12 +7,12 @@ namespace Drupal\FunctionalTests\Menu; use Drupal\Core\Url; use Drupal\menu_link_content\Entity\MenuLinkContent; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests that 403 active trail behavior does not overwrite original entry. - * - * @group menu */ +#[Group('menu')] class MenuActiveTrail403Test extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonAnonTest.php b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonAnonTest.php index 76a2cf44718..a5c144ecf1d 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonAnonTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonAnonTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\AnonResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Base Field Override Json Anon. */ +#[Group('rest')] class BaseFieldOverrideJsonAnonTest extends BaseFieldOverrideResourceTestBase { use AnonResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonBasicAuthTest.php index 4efe36b43f2..f863ae1bba9 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonBasicAuthTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonBasicAuthTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Base Field Override Json Basic Auth. */ +#[Group('rest')] class BaseFieldOverrideJsonBasicAuthTest extends BaseFieldOverrideResourceTestBase { use BasicAuthResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonCookieTest.php b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonCookieTest.php index a73e780d835..5d5f57ce070 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonCookieTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideJsonCookieTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\CookieResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Base Field Override Json Cookie. */ +#[Group('rest')] class BaseFieldOverrideJsonCookieTest extends BaseFieldOverrideResourceTestBase { use CookieResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlAnonTest.php b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlAnonTest.php index 44c6a021b14..7456bfad828 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlAnonTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlAnonTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\AnonResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Base Field Override Xml Anon. */ +#[Group('rest')] class BaseFieldOverrideXmlAnonTest extends BaseFieldOverrideResourceTestBase { use AnonResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlBasicAuthTest.php index f651db1657d..e40d7088c95 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlBasicAuthTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlBasicAuthTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Base Field Override Xml Basic Auth. */ +#[Group('rest')] class BaseFieldOverrideXmlBasicAuthTest extends BaseFieldOverrideResourceTestBase { use BasicAuthResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlCookieTest.php b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlCookieTest.php index acdede9bfa4..eedb7ee8d2e 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlCookieTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlCookieTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\CookieResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Base Field Override Xml Cookie. */ +#[Group('rest')] class BaseFieldOverrideXmlCookieTest extends BaseFieldOverrideResourceTestBase { use CookieResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonAnonTest.php b/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonAnonTest.php index 68ba252688f..bbad8779e7c 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonAnonTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonAnonTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\AnonResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Date Format Json Anon. */ +#[Group('rest')] class DateFormatJsonAnonTest extends DateFormatResourceTestBase { use AnonResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonBasicAuthTest.php index ecdc84cfd19..62962d4761d 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonBasicAuthTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonBasicAuthTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Date Format Json Basic Auth. */ +#[Group('rest')] class DateFormatJsonBasicAuthTest extends DateFormatResourceTestBase { use BasicAuthResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonCookieTest.php b/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonCookieTest.php index 4067f678cc3..422ec9f644e 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonCookieTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/DateFormatJsonCookieTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\CookieResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Date Format Json Cookie. */ +#[Group('rest')] class DateFormatJsonCookieTest extends DateFormatResourceTestBase { use CookieResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlAnonTest.php b/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlAnonTest.php index d0e1c012ca2..6681bb1d3f4 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlAnonTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlAnonTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\AnonResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Date Format Xml Anon. */ +#[Group('rest')] class DateFormatXmlAnonTest extends DateFormatResourceTestBase { use AnonResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlBasicAuthTest.php index 7eee1133be8..ccd0ceeaad3 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlBasicAuthTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlBasicAuthTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Date Format Xml Basic Auth. */ +#[Group('rest')] class DateFormatXmlBasicAuthTest extends DateFormatResourceTestBase { use BasicAuthResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlCookieTest.php b/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlCookieTest.php index 30eb2af68e5..5780d879d93 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlCookieTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/DateFormatXmlCookieTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\CookieResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Date Format Xml Cookie. */ +#[Group('rest')] class DateFormatXmlCookieTest extends DateFormatResourceTestBase { use CookieResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonAnonTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonAnonTest.php index 3b5cc13f9d1..971aff5ad1c 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonAnonTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonAnonTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\AnonResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity Form Display Json Anon. */ +#[Group('rest')] class EntityFormDisplayJsonAnonTest extends EntityFormDisplayResourceTestBase { use AnonResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonBasicAuthTest.php index 432c097d00d..5ee82893c8a 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonBasicAuthTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonBasicAuthTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity Form Display Json Basic Auth. */ +#[Group('rest')] class EntityFormDisplayJsonBasicAuthTest extends EntityFormDisplayResourceTestBase { use BasicAuthResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonCookieTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonCookieTest.php index 3ec1cb8f33a..15c4fbbbb1e 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonCookieTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonCookieTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\CookieResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity Form Display Json Cookie. */ +#[Group('rest')] class EntityFormDisplayJsonCookieTest extends EntityFormDisplayResourceTestBase { use CookieResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlAnonTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlAnonTest.php index 695905aeae4..d466df9f7d8 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlAnonTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlAnonTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\AnonResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity Form Display Xml Anon. */ +#[Group('rest')] class EntityFormDisplayXmlAnonTest extends EntityFormDisplayResourceTestBase { use AnonResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlBasicAuthTest.php index 2941b421968..62f4618eb96 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlBasicAuthTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlBasicAuthTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity Form Display Xml Basic Auth. */ +#[Group('rest')] class EntityFormDisplayXmlBasicAuthTest extends EntityFormDisplayResourceTestBase { use BasicAuthResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlCookieTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlCookieTest.php index 915bb21fb2d..d697e579fa3 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlCookieTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlCookieTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\CookieResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity Form Display Xml Cookie. */ +#[Group('rest')] class EntityFormDisplayXmlCookieTest extends EntityFormDisplayResourceTestBase { use CookieResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonAnonTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonAnonTest.php index 9f97c320d78..49883366571 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonAnonTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonAnonTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\AnonResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity Form Mode Json Anon. */ +#[Group('rest')] class EntityFormModeJsonAnonTest extends EntityFormModeResourceTestBase { use AnonResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonBasicAuthTest.php index bbdff334404..2a0a06c68ef 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonBasicAuthTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonBasicAuthTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity Form Mode Json Basic Auth. */ +#[Group('rest')] class EntityFormModeJsonBasicAuthTest extends EntityFormModeResourceTestBase { use BasicAuthResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonCookieTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonCookieTest.php index da6f959e691..e67266ed505 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonCookieTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonCookieTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\CookieResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity Form Mode Json Cookie. */ +#[Group('rest')] class EntityFormModeJsonCookieTest extends EntityFormModeResourceTestBase { use CookieResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlAnonTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlAnonTest.php index bd1ccb0809e..ebf94121b63 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlAnonTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlAnonTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\AnonResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity Form Mode Xml Anon. */ +#[Group('rest')] class EntityFormModeXmlAnonTest extends EntityFormModeResourceTestBase { use AnonResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlBasicAuthTest.php index 10d773ee3a1..073fafca7dc 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlBasicAuthTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlBasicAuthTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity Form Mode Xml Basic Auth. */ +#[Group('rest')] class EntityFormModeXmlBasicAuthTest extends EntityFormModeResourceTestBase { use BasicAuthResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlCookieTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlCookieTest.php index 84e96a2d783..0378795ddcd 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlCookieTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlCookieTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\CookieResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity Form Mode Xml Cookie. */ +#[Group('rest')] class EntityFormModeXmlCookieTest extends EntityFormModeResourceTestBase { use CookieResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonAnonTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonAnonTest.php index ab1be70ceb8..34a40b67264 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonAnonTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonAnonTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\AnonResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity View Display Json Anon. */ +#[Group('rest')] class EntityViewDisplayJsonAnonTest extends EntityViewDisplayResourceTestBase { use AnonResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonBasicAuthTest.php index 8c0f05b4d59..50d1eddeddb 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonBasicAuthTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonBasicAuthTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity View Display Json Basic Auth. */ +#[Group('rest')] class EntityViewDisplayJsonBasicAuthTest extends EntityViewDisplayResourceTestBase { use BasicAuthResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonCookieTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonCookieTest.php index ef4704da0b2..565b02fac5f 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonCookieTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayJsonCookieTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\CookieResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity View Display Json Cookie. */ +#[Group('rest')] class EntityViewDisplayJsonCookieTest extends EntityViewDisplayResourceTestBase { use CookieResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlAnonTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlAnonTest.php index d4f0cfe61c6..298e9f86364 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlAnonTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlAnonTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\AnonResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity View Display Xml Anon. */ +#[Group('rest')] class EntityViewDisplayXmlAnonTest extends EntityViewDisplayResourceTestBase { use AnonResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlBasicAuthTest.php index 09697cbe9f2..36b3d0c19f1 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlBasicAuthTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlBasicAuthTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity View Display Xml Basic Auth. */ +#[Group('rest')] class EntityViewDisplayXmlBasicAuthTest extends EntityViewDisplayResourceTestBase { use BasicAuthResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlCookieTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlCookieTest.php index c1ef24fe5a3..d2ee3036c9d 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlCookieTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewDisplayXmlCookieTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\CookieResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity View Display Xml Cookie. */ +#[Group('rest')] class EntityViewDisplayXmlCookieTest extends EntityViewDisplayResourceTestBase { use CookieResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonAnonTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonAnonTest.php index 7cd8de33e10..16eec966d9a 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonAnonTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonAnonTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\AnonResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity View Mode Json Anon. */ +#[Group('rest')] class EntityViewModeJsonAnonTest extends EntityViewModeResourceTestBase { use AnonResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonBasicAuthTest.php index 8d41d2e7b19..b61d4482305 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonBasicAuthTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonBasicAuthTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity View Mode Json Basic Auth. */ +#[Group('rest')] class EntityViewModeJsonBasicAuthTest extends EntityViewModeResourceTestBase { use BasicAuthResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonCookieTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonCookieTest.php index fe7c0fda9c7..e260cea160a 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonCookieTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeJsonCookieTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\CookieResourceTestTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity View Mode Json Cookie. */ +#[Group('rest')] class EntityViewModeJsonCookieTest extends EntityViewModeResourceTestBase { use CookieResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlAnonTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlAnonTest.php index 5a45858f4b0..6bfd9376075 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlAnonTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlAnonTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\AnonResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity View Mode Xml Anon. */ +#[Group('rest')] class EntityViewModeXmlAnonTest extends EntityViewModeResourceTestBase { use AnonResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlBasicAuthTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlBasicAuthTest.php index 53b287186de..de37e554fd6 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlBasicAuthTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlBasicAuthTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity View Mode Xml Basic Auth. */ +#[Group('rest')] class EntityViewModeXmlBasicAuthTest extends EntityViewModeResourceTestBase { use BasicAuthResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlCookieTest.php b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlCookieTest.php index bbd6438dbcc..1d38cbf8fa9 100644 --- a/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlCookieTest.php +++ b/core/tests/Drupal/FunctionalTests/Rest/EntityViewModeXmlCookieTest.php @@ -6,10 +6,12 @@ namespace Drupal\FunctionalTests\Rest; use Drupal\Tests\rest\Functional\CookieResourceTestTrait; use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait; +use PHPUnit\Framework\Attributes\Group; /** - * @group rest + * Tests Entity View Mode Xml Cookie. */ +#[Group('rest')] class EntityViewModeXmlCookieTest extends EntityViewModeResourceTestBase { use CookieResourceTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php index 447224e931f..9f591c70697 100644 --- a/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php +++ b/core/tests/Drupal/FunctionalTests/Routing/CaseInsensitivePathTest.php @@ -5,14 +5,13 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Routing; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore ȅchȏ foobarbaz meΦω - /** * Tests incoming path case insensitivity. - * - * @group routing */ +#[Group('routing')] class CaseInsensitivePathTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php b/core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php index 734058c0c4e..c8c91d9fd91 100644 --- a/core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php +++ b/core/tests/Drupal/FunctionalTests/Routing/DefaultFormatTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Routing; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** - * @group routing + * Tests Default Format. */ +#[Group('routing')] class DefaultFormatTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Routing/LazyRouteProviderInstallTest.php b/core/tests/Drupal/FunctionalTests/Routing/LazyRouteProviderInstallTest.php index e344c7d4190..220722dab39 100644 --- a/core/tests/Drupal/FunctionalTests/Routing/LazyRouteProviderInstallTest.php +++ b/core/tests/Drupal/FunctionalTests/Routing/LazyRouteProviderInstallTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Routing; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** - * @group routing + * Tests Lazy Route Provider Install. */ +#[Group('routing')] class LazyRouteProviderInstallTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php b/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php index 0ac2339a810..3b398a2dfd6 100644 --- a/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php +++ b/core/tests/Drupal/FunctionalTests/Routing/PathEncodedTest.php @@ -7,13 +7,13 @@ namespace Drupal\FunctionalTests\Routing; use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; use Drupal\Tests\Traits\Core\PathAliasTestTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests URL generation and routing for route paths with encoded characters. - * - * @group path - * @group routing */ +#[Group('path')] +#[Group('routing')] class PathEncodedTest extends BrowserTestBase { use PathAliasTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php index 9e4d9485d8a..8344dd31be4 100644 --- a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php +++ b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingLanguageTest.php @@ -10,12 +10,13 @@ use Drupal\language\Entity\ConfigurableLanguage; use Drupal\link\LinkItemInterface; use Drupal\Tests\BrowserTestBase; use Drupal\Tests\content_translation\Traits\ContentTranslationTestTrait; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests that route lookup is cached by the current language. - * - * @group routing */ +#[Group('routing')] class RouteCachingLanguageTest extends BrowserTestBase { use ContentTranslationTestTrait; @@ -124,9 +125,8 @@ class RouteCachingLanguageTest extends BrowserTestBase { /** * Creates content with a link field pointing to an alias of another language. - * - * @dataProvider providerLanguage */ + #[DataProvider('providerLanguage')] public function testLinkTranslationWithAlias($source_langcode): void { $source_url_options = [ 'language' => ConfigurableLanguage::load($source_langcode), diff --git a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php index 513c22142d5..a88785f3964 100644 --- a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php +++ b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingNonPathLanguageNegotiationTest.php @@ -4,16 +4,16 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Routing; -use Drupal\language\Entity\ConfigurableLanguage; use Drupal\Core\Language\LanguageInterface; +use Drupal\language\Entity\ConfigurableLanguage; use Drupal\Tests\BrowserTestBase; use Drupal\Tests\Traits\Core\PathAliasTestTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests the route cache when the language is not in the path. - * - * @group language */ +#[Group('language')] class RouteCachingNonPathLanguageNegotiationTest extends BrowserTestBase { use PathAliasTestTrait; diff --git a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingQueryAlteredTest.php b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingQueryAlteredTest.php index 3e099fa46fc..67655e54eee 100644 --- a/core/tests/Drupal/FunctionalTests/Routing/RouteCachingQueryAlteredTest.php +++ b/core/tests/Drupal/FunctionalTests/Routing/RouteCachingQueryAlteredTest.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Routing; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\Response; /** @@ -12,9 +13,8 @@ use Symfony\Component\HttpFoundation\Response; * * This happens either in the normal course of operations or due to an * exception. - * - * @group routing */ +#[Group('routing')] class RouteCachingQueryAlteredTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Test/FunctionalTestDebugHtmlOutputHelperTest.php b/core/tests/Drupal/FunctionalTests/Test/FunctionalTestDebugHtmlOutputHelperTest.php index 8bb18f2c059..3873fd2d3d1 100644 --- a/core/tests/Drupal/FunctionalTests/Test/FunctionalTestDebugHtmlOutputHelperTest.php +++ b/core/tests/Drupal/FunctionalTests/Test/FunctionalTestDebugHtmlOutputHelperTest.php @@ -5,14 +5,14 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Test; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Helper test for FunctionalTestDebugHtmlOutputTest. * * @see \Drupal\FunctionalTests\Test\FunctionalTestDebugHtmlOutputTest::testFunctionalTestDebugHtmlOutput - * - * @group browsertestbase */ +#[Group('browsertestbase')] class FunctionalTestDebugHtmlOutputHelperTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Test/FunctionalTestDebugHtmlOutputTest.php b/core/tests/Drupal/FunctionalTests/Test/FunctionalTestDebugHtmlOutputTest.php index 64c19772140..945cf12430b 100644 --- a/core/tests/Drupal/FunctionalTests/Test/FunctionalTestDebugHtmlOutputTest.php +++ b/core/tests/Drupal/FunctionalTests/Test/FunctionalTestDebugHtmlOutputTest.php @@ -6,14 +6,14 @@ namespace Drupal\FunctionalTests\Test; use Drupal\Core\File\FileExists; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Process\Process; /** * Test to ensure that functional tests produce debug HTML output when required. - * - * @group browsertestbase - * @group #slow */ +#[Group('browsertestbase')] +#[Group('#slow')] class FunctionalTestDebugHtmlOutputTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php b/core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php index 99e4974e3fc..fca57abec9d 100644 --- a/core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php +++ b/core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Theme; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the layout builder with the Claro theme. - * - * @group claro */ +#[Group('claro')] class ClaroLayoutBuilderTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php b/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php index b38938f3138..973feb8d05b 100644 --- a/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php +++ b/core/tests/Drupal/FunctionalTests/Theme/ClaroTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Theme; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the Claro theme. - * - * @group claro */ +#[Group('claro')] class ClaroTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php b/core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php index dc03f86a963..c37c694b06f 100644 --- a/core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php +++ b/core/tests/Drupal/FunctionalTests/Theme/OliveroTest.php @@ -4,14 +4,14 @@ declare(strict_types=1); namespace Drupal\FunctionalTests\Theme; -use Drupal\Tests\BrowserTestBase; use Drupal\menu_link_content\Entity\MenuLinkContent; +use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the Olivero theme. - * - * @group olivero */ +#[Group('olivero')] class OliveroTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php index b8c5dbde1ee..f02ecdfba47 100644 --- a/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php +++ b/core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalTests\Update; use Drupal\Core\Database\Database; use Drupal\Core\Site\Settings; +use PHPUnit\Framework\Attributes\Group; /** * Tests the update path base class. - * - * @group Update */ +#[Group('Update')] class UpdatePathTestBaseTest extends UpdatePathTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Update/UpdateReducedThemeRegistryTest.php b/core/tests/Drupal/FunctionalTests/Update/UpdateReducedThemeRegistryTest.php index b31d62cc3d0..ba2cc5ee18f 100644 --- a/core/tests/Drupal/FunctionalTests/Update/UpdateReducedThemeRegistryTest.php +++ b/core/tests/Drupal/FunctionalTests/Update/UpdateReducedThemeRegistryTest.php @@ -6,12 +6,12 @@ namespace Drupal\FunctionalTests\Update; use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests that update.php is accessible even if there are unstable modules. - * - * @group Update */ +#[Group('Update')] class UpdateReducedThemeRegistryTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/UserHelpersTest.php b/core/tests/Drupal/FunctionalTests/UserHelpersTest.php index 151a0827246..a5cac6dc418 100644 --- a/core/tests/Drupal/FunctionalTests/UserHelpersTest.php +++ b/core/tests/Drupal/FunctionalTests/UserHelpersTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\FunctionalTests; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests User related helper methods of BrowserTestBase. - * - * @group browsertestbase */ +#[Group('browsertestbase')] class UserHelpersTest extends BrowserTestBase { /** diff --git a/core/tests/Drupal/Nightwatch/Tests/a11yTestAdmin.js b/core/tests/Drupal/Nightwatch/Tests/a11yTestAdmin.js index ea71f685206..3dc498246aa 100644 --- a/core/tests/Drupal/Nightwatch/Tests/a11yTestAdmin.js +++ b/core/tests/Drupal/Nightwatch/Tests/a11yTestAdmin.js @@ -25,6 +25,30 @@ const testCases = [ { name: 'Structure Page', path: '/admin/structure' }, { name: 'Add content type', path: '/admin/structure/types/add' }, { name: 'Add vocabulary', path: '/admin/structure/taxonomy/add' }, + { + // Tests long breadcrumb for https://drupal.org/i/3223147. + name: 'Manage text format, mobile', + path: '/admin/config/content/formats/manage/restricted_html', + windowSize: { + // Dimensions used by Lighthouse for mobile. + width: 415, + height: 823, + }, + options: { + runOnly: { + type: 'tag', + values: [ + 'wcag2a', + 'wcag2aa', + 'wcag21a', + 'wcag21aa', + 'best-practice', + 'wcag22a', + 'wcag22aa', + ], + }, + }, + }, // @todo remove the skipped rules below in https://drupal.org/i/3318394. { name: 'Structure | Block', @@ -41,6 +65,13 @@ const testCases = [ testCases.forEach((testCase) => { adminTest[`Accessibility - Admin Theme: ${testCase.name}`] = (browser) => { + if (testCase.windowSize) { + browser.setWindowSize( + testCase.windowSize.width, + testCase.windowSize.height, + ); + } + browser.drupalLoginAsAdmin(() => { browser .drupalRelativeURL(testCase.path) diff --git a/core/tests/Drupal/Nightwatch/Tests/htmx/htmxTest.js b/core/tests/Drupal/Nightwatch/Tests/htmx/htmxTest.js index 98916702a88..4705455683d 100644 --- a/core/tests/Drupal/Nightwatch/Tests/htmx/htmxTest.js +++ b/core/tests/Drupal/Nightwatch/Tests/htmx/htmxTest.js @@ -41,8 +41,54 @@ module.exports = { .assert.not.elementPresent(cssSelector) .waitForElementVisible('[name="replace"]', 1000) .click('[name="replace"]') - .waitForElementVisible(elementSelector, 6000) - .waitForElementVisible(elementInitSelector, 6000) + .waitForElementVisible(elementSelector, 1100) + .waitForElementVisible(elementInitSelector, 1100) + .assert.elementPresent(scriptSelector) + .assert.elementPresent(cssSelector); + }, + + 'Swap Before': (browser) => { + // Load the route htmx will use for the request on click and confirm the + // markup we will be looking for is present in the source markup. + browser + .drupalRelativeURL('/htmx-test-attachments/replace') + .waitForElementVisible('body', 1000) + .assert.elementPresent(elementInitSelector); + // Now load the page with the htmx enhanced button and verify the absence + // of the markup to be inserted. Click the button + // and check for inserted javascript and markup. + browser + .drupalRelativeURL('/htmx-test-attachments/before') + .waitForElementVisible('body', 1000) + .assert.not.elementPresent(scriptSelector) + .assert.not.elementPresent(cssSelector) + .waitForElementVisible('[name="replace"]', 1000) + .click('[name="replace"]') + .waitForElementVisible(elementSelector, 1100) + .waitForElementVisible(elementInitSelector, 1100) + .assert.elementPresent(scriptSelector) + .assert.elementPresent(cssSelector); + }, + + 'Swap After': (browser) => { + // Load the route htmx will use for the request on click and confirm the + // markup we will be looking for is present in the source markup. + browser + .drupalRelativeURL('/htmx-test-attachments/replace') + .waitForElementVisible('body', 1000) + .assert.elementPresent(elementInitSelector); + // Now load the page with the htmx enhanced button and verify the absence + // of the markup to be inserted. Click the button + // and check for inserted javascript and markup. + browser + .drupalRelativeURL('/htmx-test-attachments/after') + .waitForElementVisible('body', 1000) + .assert.not.elementPresent(scriptSelector) + .assert.not.elementPresent(cssSelector) + .waitForElementVisible('[name="replace"]', 1000) + .click('[name="replace"]') + .waitForElementVisible(elementSelector, 1100) + .waitForElementVisible(elementInitSelector, 1100) .assert.elementPresent(scriptSelector) .assert.elementPresent(cssSelector); }, @@ -69,8 +115,8 @@ module.exports = { .waitForElementVisible('[name="replace"]', 1000) .pause(1000) .click('[name="replace"]') - .waitForElementVisible(elementSelector, 6000) - .waitForElementVisible(elementInitSelector, 6000) + .waitForElementVisible(elementSelector, 1100) + .waitForElementVisible(elementInitSelector, 1100) .assert.elementPresent(scriptSelector) .assert.elementPresent(cssSelector); }, |