diff options
Diffstat (limited to 'core')
352 files changed, 1365 insertions, 1352 deletions
diff --git a/core/lib/Drupal/Component/Datetime/DateTimePlus.php b/core/lib/Drupal/Component/Datetime/DateTimePlus.php index 4f95d6d8b662..90d9c3008544 100644 --- a/core/lib/Drupal/Component/Datetime/DateTimePlus.php +++ b/core/lib/Drupal/Component/Datetime/DateTimePlus.php @@ -53,62 +53,6 @@ class DateTimePlus { const RFC7231 = 'D, d M Y H:i:s \G\M\T'; /** - * An array of possible date parts. - * - * @var string[] - */ - protected static $dateParts = [ - 'year', - 'month', - 'day', - 'hour', - 'minute', - 'second', - ]; - - /** - * The value of the time value passed to the constructor. - * - * @var string - */ - protected $inputTimeRaw = ''; - - /** - * The prepared time, without timezone, for this date. - * - * @var string - */ - protected $inputTimeAdjusted = ''; - - /** - * The value of the timezone passed to the constructor. - * - * @var string - */ - protected $inputTimeZoneRaw = ''; - - /** - * The prepared timezone object used to construct this date. - * - * @var string - */ - protected $inputTimeZoneAdjusted = ''; - - /** - * The value of the format passed to the constructor. - * - * @var string - */ - protected $inputFormatRaw = ''; - - /** - * The prepared format, if provided. - * - * @var string - */ - protected $inputFormatAdjusted = ''; - - /** * The value of the language code passed to the constructor. * * @var string|null diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index 0a28501ae71c..6bb9fb6b1886 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -209,7 +209,13 @@ class Renderer implements RendererInterface { /** * {@inheritdoc} */ - public function render(&$elements, $is_root_call = FALSE) { + public function render(/* array */&$elements, $is_root_call = FALSE) { + + if (!is_array($elements)) { + trigger_error('Calling ' . __METHOD__ . ' with NULL is deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. Either pass an array or skip the call. See https://www.drupal.org/node/3534020.'); + return ''; + } + $context = $this->getCurrentRenderContext(); if (!isset($context)) { throw new \LogicException("Render context is empty, because render() was called outside of a renderRoot() or renderPlain() call. Use renderPlain()/renderRoot() or #lazy_builder/#pre_render instead."); diff --git a/core/lib/Drupal/Core/Render/RendererInterface.php b/core/lib/Drupal/Core/Render/RendererInterface.php index 020e594755fb..081545bd79dd 100644 --- a/core/lib/Drupal/Core/Render/RendererInterface.php +++ b/core/lib/Drupal/Core/Render/RendererInterface.php @@ -340,7 +340,7 @@ interface RendererInterface { * @see \Drupal\Core\Render\AttachmentsResponseProcessorInterface::processAttachments() * @see \Drupal\Core\Render\RendererInterface::renderRoot() */ - public function render(&$elements, $is_root_call = FALSE); + public function render(/* array */&$elements, $is_root_call = FALSE); /** * Checks whether a render context is active. diff --git a/core/modules/announcements_feed/tests/src/FunctionalJavascript/AccessAnnouncementTest.php b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AccessAnnouncementTest.php index 02718fe8e406..4876bf779d2f 100644 --- a/core/modules/announcements_feed/tests/src/FunctionalJavascript/AccessAnnouncementTest.php +++ b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AccessAnnouncementTest.php @@ -4,14 +4,14 @@ declare(strict_types=1); namespace Drupal\Tests\announcements_feed\FunctionalJavascript; -use Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase; use Drupal\announce_feed_test\AnnounceTestHttpClientMiddleware; +use Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Test the access announcement permissions to get access announcement icon. - * - * @group announcements_feed */ +#[Group('announcements_feed')] class AccessAnnouncementTest extends OffCanvasTestBase { /** diff --git a/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php index 39edf53e90c1..77a8df8b32bc 100644 --- a/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php +++ b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php @@ -4,15 +4,15 @@ declare(strict_types=1); namespace Drupal\Tests\announcements_feed\FunctionalJavascript; -use Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase; use Drupal\announce_feed_test\AnnounceTestHttpClientMiddleware; +use Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase; use Drupal\user\UserInterface; +use PHPUnit\Framework\Attributes\Group; /** * Test the access announcement according to json feed changes. - * - * @group announcements_feed */ +#[Group('announcements_feed')] class AlertsJsonFeedTest extends OffCanvasTestBase { /** diff --git a/core/modules/announcements_feed/tests/src/FunctionalJavascript/AnnounceBlockTest.php b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AnnounceBlockTest.php index a796ccf0b8d0..dd7f4f747914 100644 --- a/core/modules/announcements_feed/tests/src/FunctionalJavascript/AnnounceBlockTest.php +++ b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AnnounceBlockTest.php @@ -10,12 +10,12 @@ use Drupal\Core\Access\AccessResultAllowed; use Drupal\Core\Access\AccessResultNeutral; use Drupal\Core\Session\AnonymousUserSession; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Test the announcement block test visibility. - * - * @group announcements_feed */ +#[Group('announcements_feed')] class AnnounceBlockTest extends WebDriverTestBase { /** diff --git a/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipePreviewTest.php b/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipePreviewTest.php index 3579ca7b2f4a..ad064369206d 100644 --- a/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipePreviewTest.php +++ b/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipePreviewTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\big_pipe\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests placeholder preview functionality. - * - * @group big_pipe */ +#[Group('big_pipe')] class BigPipePreviewTest extends WebDriverTestBase { /** diff --git a/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php b/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php index 8e4abff5734f..e94279d94043 100644 --- a/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php +++ b/core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php @@ -8,13 +8,13 @@ use Drupal\big_pipe\Render\BigPipe; use Drupal\big_pipe_regression_test\BigPipeRegressionTestController; use Drupal\Core\Url; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * BigPipe regression tests. - * - * @group big_pipe - * @group #slow */ +#[Group('big_pipe')] +#[Group('#slow')] class BigPipeRegressionTest extends WebDriverTestBase { /** diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php index 9be17d58a175..84d1960c399f 100644 --- a/core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php +++ b/core/modules/block/tests/src/FunctionalJavascript/BlockAddTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\block\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JS functionality in the block add form. - * - * @group block */ +#[Group('block')] class BlockAddTest extends WebDriverTestBase { /** diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockContextualLinksTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockContextualLinksTest.php index c425731e8448..038542b44551 100644 --- a/core/modules/block/tests/src/FunctionalJavascript/BlockContextualLinksTest.php +++ b/core/modules/block/tests/src/FunctionalJavascript/BlockContextualLinksTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\block\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the contextual links added while rendering the block. - * - * @group block */ +#[Group('block')] class BlockContextualLinksTest extends WebDriverTestBase { /** diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockDragTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockDragTest.php index 4de5edebdd22..6fcf9d54f1ee 100644 --- a/core/modules/block/tests/src/FunctionalJavascript/BlockDragTest.php +++ b/core/modules/block/tests/src/FunctionalJavascript/BlockDragTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\block\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests drag and drop blocks on block layout page. - * - * @group block */ +#[Group('block')] class BlockDragTest extends WebDriverTestBase { /** diff --git a/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php b/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php index 3502e65a1959..a96930f375d5 100644 --- a/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php +++ b/core/modules/block/tests/src/FunctionalJavascript/BlockFilterTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\block\FunctionalJavascript; use Behat\Mink\Element\NodeElement; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JavaScript functionality of the block add filter. - * - * @group block */ +#[Group('block')] class BlockFilterTest extends WebDriverTestBase { /** diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/AdminUiTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/AdminUiTest.php index d380114dfe7d..402aaf171585 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/AdminUiTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/AdminUiTest.php @@ -4,14 +4,15 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; -// cspell:ignore sourceediting xmlhttprequest +use PHPUnit\Framework\Attributes\Group; +// cspell:ignore sourceediting xmlhttprequest /** * Tests for CKEditor 5 in the admin UI. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class AdminUiTest extends CKEditor5TestBase { /** diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php index ca9cb17ca62b..d2187c7ce01c 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5AllowedTagsTest.php @@ -7,16 +7,16 @@ namespace Drupal\Tests\ckeditor5\FunctionalJavascript; use Drupal\Core\Entity\Entity\EntityViewMode; use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Yaml\Yaml; // cspell:ignore esque imageUpload sourceediting Editing's - /** * Tests for CKEditor 5. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class CKEditor5AllowedTagsTest extends CKEditor5TestBase { /** diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5CodeSyntaxTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5CodeSyntaxTest.php index a0d16cfb2c37..ad9feb4d19b9 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5CodeSyntaxTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5CodeSyntaxTest.php @@ -7,13 +7,14 @@ namespace Drupal\Tests\ckeditor5\FunctionalJavascript; use Behat\Mink\Element\NodeElement; use Drupal\editor\Entity\Editor; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests code block configured languages are respected. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class CKEditor5CodeSyntaxTest extends CKEditor5TestBase { use CKEditor5TestTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php index 9ed2be2d85ba..599a6b68b292 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5DialogTest.php @@ -9,14 +9,15 @@ use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; use Drupal\user\RoleInterface; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Validator\ConstraintViolationInterface; /** * Tests for CKEditor 5 to ensure correct focus management in dialogs. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class CKEditor5DialogTest extends CKEditor5TestBase { use CKEditor5TestTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5FragmentLinkTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5FragmentLinkTest.php index fc36e1799bd2..c04c33491865 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5FragmentLinkTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5FragmentLinkTest.php @@ -14,13 +14,14 @@ use Drupal\node\Entity\NodeType; use Drupal\Tests\TestFileCreationTrait; use Drupal\user\Entity\User; use Drupal\user\RoleInterface; +use PHPUnit\Framework\Attributes\Group; /** * Tests that the fragment link points to CKEditor 5. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class CKEditor5FragmentLinkTest extends WebDriverTestBase { use TestFileCreationTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5HeightTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5HeightTest.php index 81928b1642b9..12e54868a8ae 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5HeightTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5HeightTest.php @@ -6,13 +6,14 @@ namespace Drupal\Tests\ckeditor5\FunctionalJavascript; use Drupal\editor\Entity\Editor; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests ckeditor height respects field rows config. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class CKEditor5HeightTest extends CKEditor5TestBase { use CKEditor5TestTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php index 3557f2df2448..c673f1e43f4d 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5MarkupTest.php @@ -12,16 +12,16 @@ use Drupal\node\Entity\Node; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; use Drupal\Tests\TestFileCreationTrait; use Drupal\user\RoleInterface; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore esque māori sourceediting splitbutton upcasted - /** * Tests for CKEditor 5. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class CKEditor5MarkupTest extends CKEditor5TestBase { use TestFileCreationTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5OffCanvasTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5OffCanvasTest.php index f52ebb874c5e..fd65022c5c2a 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5OffCanvasTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5OffCanvasTest.php @@ -4,12 +4,14 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; +use PHPUnit\Framework\Attributes\Group; + /** * Tests for CKEditor 5 to ensure correct styling in off-canvas. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class CKEditor5OffCanvasTest extends CKEditor5TestBase { /** diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ReadOnlyModeTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ReadOnlyModeTest.php index c52ae83c9118..fef1e9db8c20 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ReadOnlyModeTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ReadOnlyModeTest.php @@ -6,13 +6,14 @@ namespace Drupal\Tests\ckeditor5\FunctionalJavascript; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; +use PHPUnit\Framework\Attributes\Group; /** * Tests read-only mode for CKEditor 5. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class CKEditor5ReadOnlyModeTest extends CKEditor5TestBase { /** diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php index 10a32513fb2a..45798b4d3c64 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php @@ -14,16 +14,16 @@ use Drupal\node\Entity\Node; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; use Drupal\Tests\TestFileCreationTrait; use Drupal\user\RoleInterface; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore esque māori sourceediting splitbutton upcasted - /** * Tests for CKEditor 5. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class CKEditor5Test extends CKEditor5TestBase { use TestFileCreationTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ToolbarTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ToolbarTest.php index 3cea91885095..5d6905ff2a08 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ToolbarTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5ToolbarTest.php @@ -9,14 +9,15 @@ use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\user\Entity\User; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Validator\ConstraintViolationInterface; /** * Tests for CKEditor 5 editor UI with Toolbar module. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class CKEditor5ToolbarTest extends WebDriverTestBase { /** diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php index e5c772e93e9c..d8dda21e28e0 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/EmphasisTest.php @@ -9,6 +9,7 @@ use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Validator\ConstraintViolationInterface; /** @@ -17,9 +18,9 @@ use Symfony\Component\Validator\ConstraintViolationInterface; * CKEditor's use of <i> is converted to <em> in Drupal, so additional coverage * is provided here to verify successful conversion. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class EmphasisTest extends WebDriverTestBase { use CKEditor5TestTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTest.php index 79c37f0c6e2d..ea1b61b8416e 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTest.php @@ -4,14 +4,19 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; -// cspell:ignore imageresize imageupload +use Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; +// cspell:ignore imageresize imageupload /** - * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image - * @group ckeditor5 - * @group #slow + * Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image. + * * @internal */ +#[CoversClass(Image::class)] +#[Group('ckeditor5')] +#[Group('#slow')] class ImageTest extends ImageTestTestBase { use ImageTestBaselineTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php index 8efebd4de818..cf9c14b29634 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php @@ -4,16 +4,20 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; -use Drupal\Tests\TestFileCreationTrait; +use Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; +use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore imageresize - /** - * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image - * @group ckeditor5 + * Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image. + * * @internal */ +#[CoversClass(Image::class)] +#[Group('ckeditor5')] abstract class ImageTestBase extends CKEditor5TestBase { use CKEditor5TestTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestProviderTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestProviderTest.php index 82a5c503b769..932e0ad1a751 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestProviderTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestProviderTest.php @@ -4,12 +4,18 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; +use Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; + /** - * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image - * @group ckeditor5 - * @group #slow + * Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image. + * * @internal */ +#[CoversClass(Image::class)] +#[Group('ckeditor5')] +#[Group('#slow')] class ImageTestProviderTest extends ImageTestTestBase { use ImageTestProviderTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestProviderTrait.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestProviderTrait.php index 2588cce74b07..fc16afe6cdba 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestProviderTrait.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestProviderTrait.php @@ -6,6 +6,7 @@ namespace Drupal\Tests\ckeditor5\FunctionalJavascript; use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; +use PHPUnit\Framework\Attributes\DataProvider; // cspell:ignore imageresize @@ -18,9 +19,8 @@ trait ImageTestProviderTrait { * Tests that alt text is required for images. * * @see https://ckeditor.com/docs/ckeditor5/latest/framework/guides/architecture/editing-engine.html#conversion - * - * @dataProvider providerAltTextRequired */ + #[DataProvider('providerAltTextRequired')] public function testAltTextRequired(bool $unrestricted): void { // Disable filter_html. if ($unrestricted) { @@ -122,9 +122,8 @@ trait ImageTestProviderTrait { /** * Tests alignment integration. - * - * @dataProvider providerAlignment */ + #[DataProvider('providerAlignment')] public function testAlignment(string $image_type): void { $assert_session = $this->assertSession(); $page = $this->getSession()->getPage(); @@ -198,9 +197,8 @@ trait ImageTestProviderTrait { * * @param string $width * The width input for the image. - * - * @dataProvider providerWidth */ + #[DataProvider('providerWidth')] public function testWidth(string $width): void { $page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); @@ -264,9 +262,8 @@ trait ImageTestProviderTrait { * * @param bool $is_resize_enabled * Boolean flag to test enabled or disabled. - * - * @dataProvider providerResize */ + #[DataProvider('providerResize')] public function testResize(bool $is_resize_enabled): void { // Disable resize plugin because it is enabled by default. if (!$is_resize_enabled) { diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlProviderTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlProviderTest.php index 9ddcf4eec3e4..6ce56094bb71 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlProviderTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlProviderTest.php @@ -4,12 +4,18 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; +use Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; + /** - * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image - * @group ckeditor5 - * @group #slow + * Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image. + * * @internal */ +#[CoversClass(Image::class)] +#[Group('ckeditor5')] +#[Group('#slow')] class ImageUrlProviderTest extends ImageUrlTestBase { use ImageTestProviderTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlTest.php index d2ed0f991e85..5812b9c05bb1 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlTest.php @@ -4,12 +4,18 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; +use Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; + /** - * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image - * @group ckeditor5 - * @group #slow + * Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image. + * * @internal */ +#[CoversClass(Image::class)] +#[Group('ckeditor5')] +#[Group('#slow')] class ImageUrlTest extends ImageUrlTestBase { use ImageTestBaselineTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/JSTranslationTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/JSTranslationTest.php index fe74ff25997e..09debb23b16a 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/JSTranslationTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/JSTranslationTest.php @@ -6,15 +6,15 @@ namespace Drupal\Tests\ckeditor5\FunctionalJavascript; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\Tests\media\Traits\MediaTypeCreationTrait; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore drupalmediatoolbar - /** * Tests for CKEditor 5 plugins using Drupal's translation system. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class JSTranslationTest extends CKEditor5TestBase { use MediaTypeCreationTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/LanguageTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/LanguageTest.php index 47ed0b6569b5..f57ab070f890 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/LanguageTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/LanguageTest.php @@ -5,15 +5,16 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; use Drupal\language\Entity\ConfigurableLanguage; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore คำพูดบล็อก sourceediting - /** * Tests for CKEditor 5 UI translations. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class LanguageTest extends CKEditor5TestBase { /** @@ -33,9 +34,8 @@ class LanguageTest extends CKEditor5TestBase { * The CKEditor 5 plugin to enable. * @param string $toolbar_item_translation * The expected translation for CKEditor 5 plugin toolbar button. - * - * @dataProvider provider */ + #[DataProvider('provider')] public function test(string $langcode, string $toolbar_item_name, string $toolbar_item_translation): void { $page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php index c95baf47e0c4..876729728344 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLibraryTest.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; +use Drupal\ckeditor5\Plugin\CKEditor5Plugin\MediaLibrary; use Drupal\ckeditor5\Plugin\Editor\CKEditor5; use Drupal\editor\Entity\Editor; use Drupal\file\Entity\File; @@ -13,15 +14,18 @@ use Drupal\media\Entity\Media; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; use Drupal\Tests\media\Traits\MediaTypeCreationTrait; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore arrakis complote détruire harkonnen - /** - * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\MediaLibrary - * @group ckeditor5 + * Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\MediaLibrary. + * * @internal */ +#[CoversClass(MediaLibrary::class)] +#[Group('ckeditor5')] class MediaLibraryTest extends WebDriverTestBase { use MediaTypeCreationTrait; diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php index 2d581b36ee5c..c80cb5fd26d9 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaLinkabilityTest.php @@ -4,23 +4,28 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; +use Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media; +use Drupal\ckeditor5\Plugin\Editor\CKEditor5; use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; -use Drupal\ckeditor5\Plugin\Editor\CKEditor5; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Validator\ConstraintViolationInterface; /** - * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media - * @group ckeditor5 + * Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media. + * * @internal */ +#[CoversClass(Media::class)] +#[Group('ckeditor5')] class MediaLinkabilityTest extends MediaTestBase { /** * Ensures arbitrary attributes can be added on links wrapping media via GHS. - * - * @dataProvider providerLinkability */ + #[DataProvider('providerLinkability')] public function testLinkedMediaArbitraryHtml(bool $unrestricted): void { $assert_session = $this->assertSession(); @@ -84,9 +89,8 @@ class MediaLinkabilityTest extends MediaTestBase { * "dataDowncast" results. These are CKEditor 5 concepts. * * @see https://ckeditor.com/docs/ckeditor5/latest/framework/guides/architecture/editing-engine.html#conversion - * - * @dataProvider providerLinkability */ + #[DataProvider('providerLinkability')] public function testLinkability(bool $unrestricted): void { // Disable filter_html. if ($unrestricted) { @@ -235,9 +239,8 @@ class MediaLinkabilityTest extends MediaTestBase { /** * Ensure that manual link decorators work with linkable media. - * - * @dataProvider providerLinkability */ + #[DataProvider('providerLinkability')] public function testLinkManualDecorator(bool $unrestricted): void { \Drupal::service('module_installer')->install(['ckeditor5_manual_decorator_test']); $this->resetAll(); diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php index 80e6d94373c4..bcf930530a10 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaPreviewTest.php @@ -4,18 +4,23 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; +use Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media; use Drupal\Core\Database\Database; use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\filter\Entity\FilterFormat; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore drupalmediaediting - /** - * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media - * @group ckeditor5 - * @group #slow + * Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media. + * * @internal */ +#[CoversClass(Media::class)] +#[Group('ckeditor5')] +#[Group('#slow')] class MediaPreviewTest extends MediaTestBase { /** @@ -138,9 +143,8 @@ class MediaPreviewTest extends MediaTestBase { * Whether to test with media_embed filter enabled on the text format. * @param bool $can_use_format * Whether the logged in user is allowed to use the text format. - * - * @dataProvider previewAccessProvider */ + #[DataProvider('previewAccessProvider')] public function testEmbedPreviewAccess($media_embed_enabled, $can_use_format): void { // Reconfigure the host entity's text format to suit our needs. /** @var \Drupal\filter\FilterFormatInterface $format */ diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php index 5ba284497086..931a461b41d4 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/MediaTest.php @@ -4,9 +4,9 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; +use Drupal\ckeditor5\Plugin\Editor\CKEditor5; use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\Core\Entity\Entity\EntityViewMode; -use Drupal\ckeditor5\Plugin\Editor\CKEditor5; use Drupal\editor\Entity\Editor; use Drupal\field\Entity\FieldConfig; use Drupal\filter\Entity\FilterFormat; @@ -15,17 +15,21 @@ use Drupal\language\Entity\ContentLanguageSettings; use Drupal\media\Entity\Media; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore alternatif drupalelementstyle hurlant layercake tatou texte // cspell:ignore zartan - /** - * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media - * @group ckeditor5 - * @group #slow + * Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media. + * * @internal */ +#[CoversClass(\Drupal\ckeditor5\Plugin\CKEditor5Plugin\Media::class)] +#[Group('ckeditor5')] +#[Group('#slow')] class MediaTest extends MediaTestBase { /** @@ -759,9 +763,8 @@ class MediaTest extends MediaTestBase { * Tests that view mode is reflected onto the CKEditor 5 Widget wrapper, that * the media style toolbar allows changing the view mode and that the changes * are reflected on the widget and downcast drupal-media tag. - * - * @dataProvider providerTestViewMode */ + #[DataProvider('providerTestViewMode')] public function testViewMode(bool $with_alignment): void { EntityViewMode::create([ 'id' => 'media.view_mode_3', diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php index 31e6d07ca31d..2b2a8484870a 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/SourceEditingTest.php @@ -5,23 +5,29 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; use Drupal\ckeditor5\HTMLRestrictions; +use Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing; +use Drupal\ckeditor5\Plugin\Editor\CKEditor5; use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; -use Drupal\ckeditor5\Plugin\Editor\CKEditor5; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Validator\ConstraintViolationInterface; // cspell:ignore gramma sourceediting - /** - * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing - * @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig - * @group ckeditor5 + * Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing. + * * @internal + * @legacy-covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig */ +#[CoversClass(SourceEditing::class)] +#[Group('ckeditor5')] class SourceEditingTest extends SourceEditingTestBase { /** - * @covers \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing::buildConfigurationForm + * Tests source editing settings form. + * + * @legacy-covers \Drupal\ckeditor5\Plugin\CKEditor5Plugin\SourceEditing::buildConfigurationForm */ public function testSourceEditingSettingsForm(): void { $this->drupalLogin($this->drupalCreateUser(['administer filters'])); diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php index 2de2d3201dc9..5e6b90a5d8f3 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/StyleTest.php @@ -4,25 +4,31 @@ declare(strict_types=1); namespace Drupal\Tests\ckeditor5\FunctionalJavascript; -// cspell:ignore sourceediting - +use Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style; use Drupal\ckeditor5\Plugin\Editor\CKEditor5; use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; +// cspell:ignore sourceediting +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Validator\ConstraintViolationInterface; /** - * @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style - * @group ckeditor5 + * Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style. + * * @internal */ +#[CoversClass(Style::class)] +#[Group('ckeditor5')] class StyleTest extends CKEditor5TestBase { use CKEditor5TestTrait; /** - * @covers \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style::buildConfigurationForm + * Tests style settings form. + * + * @legacy-covers \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Style::buildConfigurationForm */ public function testStyleSettingsForm(): void { $this->drupalLogin($this->drupalCreateUser(['administer filters'])); diff --git a/core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php b/core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php index 1d3dadbe4c3a..0dc9e847bddb 100644 --- a/core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php +++ b/core/modules/ckeditor5/tests/src/FunctionalJavascript/TableTest.php @@ -9,14 +9,15 @@ use Drupal\editor\Entity\Editor; use Drupal\filter\Entity\FilterFormat; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\Validator\ConstraintViolationInterface; /** * For testing the table plugin. * - * @group ckeditor5 * @internal */ +#[Group('ckeditor5')] class TableTest extends WebDriverTestBase { use CKEditor5TestTrait; diff --git a/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php b/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php index 612a654bcf55..42f671b9311c 100644 --- a/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php +++ b/core/modules/config/tests/src/FunctionalJavascript/ConfigEntityTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\config\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the Config operations through the UI. - * - * @group config */ +#[Group('config')] class ConfigEntityTest extends WebDriverTestBase { /** diff --git a/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php b/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php index de9bb6ce8897..31042be6c35f 100644 --- a/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php +++ b/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\config\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\block_content\Traits\BlockContentCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests the config export form. - * - * @group config */ +#[Group('config')] class ConfigExportTest extends WebDriverTestBase { use BlockContentCreationTrait; diff --git a/core/modules/config/tests/src/FunctionalJavascript/ConfigImportUIAjaxTest.php b/core/modules/config/tests/src/FunctionalJavascript/ConfigImportUIAjaxTest.php index 61787d01db04..16c613c9fd4b 100644 --- a/core/modules/config/tests/src/FunctionalJavascript/ConfigImportUIAjaxTest.php +++ b/core/modules/config/tests/src/FunctionalJavascript/ConfigImportUIAjaxTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\config\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the user interface for importing configuration. - * - * @group config */ +#[Group('config')] class ConfigImportUIAjaxTest extends WebDriverTestBase { /** diff --git a/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php b/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php index 5d8b08bc54d6..2a26a7696f08 100644 --- a/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/tests/src/FunctionalJavascript/ConfigTranslationUiTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\config_translation\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\language\Entity\ConfigurableLanguage; +use PHPUnit\Framework\Attributes\Group; /** * Translate settings and entities to various languages. - * - * @group config_translation */ +#[Group('config_translation')] class ConfigTranslationUiTest extends WebDriverTestBase { /** diff --git a/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationConfigUITest.php b/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationConfigUITest.php index 4f4b7da3709f..420e32b61a0e 100644 --- a/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationConfigUITest.php +++ b/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationConfigUITest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\content_translation\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests that the content translation configuration javascript does't fail. - * - * @group content_translation */ +#[Group('content_translation')] class ContentTranslationConfigUITest extends WebDriverTestBase { /** diff --git a/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php b/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php index 8e11084b1f62..943f24def3c7 100644 --- a/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php +++ b/core/modules/content_translation/tests/src/FunctionalJavascript/ContentTranslationContextualLinksTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\content_translation\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\language\Entity\ConfigurableLanguage; +use PHPUnit\Framework\Attributes\Group; /** * Tests that contextual links are available for content translation. - * - * @group content_translation */ +#[Group('content_translation')] class ContentTranslationContextualLinksTest extends WebDriverTestBase { /** diff --git a/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php b/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php index 69a8855637d8..dd1d6f1ae921 100644 --- a/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php +++ b/core/modules/contextual/tests/src/FunctionalJavascript/ContextualLinksTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\contextual\FunctionalJavascript; use Drupal\Core\Url; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\user\Entity\Role; +use PHPUnit\Framework\Attributes\Group; /** * Tests the UI for correct contextual links. - * - * @group contextual */ +#[Group('contextual')] class ContextualLinksTest extends WebDriverTestBase { use ContextualLinkClickTrait; diff --git a/core/modules/contextual/tests/src/FunctionalJavascript/DuplicateContextualLinksTest.php b/core/modules/contextual/tests/src/FunctionalJavascript/DuplicateContextualLinksTest.php index 8549a9c06ffc..a3f6e1d7fbc5 100644 --- a/core/modules/contextual/tests/src/FunctionalJavascript/DuplicateContextualLinksTest.php +++ b/core/modules/contextual/tests/src/FunctionalJavascript/DuplicateContextualLinksTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\contextual\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the UI for correct contextual links. - * - * @group contextual */ +#[Group('contextual')] class DuplicateContextualLinksTest extends WebDriverTestBase { /** diff --git a/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php b/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php index 1d4fa243c492..e0a7391d7f83 100644 --- a/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php +++ b/core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php @@ -5,13 +5,13 @@ declare(strict_types=1); namespace Drupal\Tests\contextual\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests edit mode. - * - * @group contextual - * @group #slow */ +#[Group('contextual')] +#[Group('#slow')] class EditModeTest extends WebDriverTestBase { /** diff --git a/core/modules/datetime_range/tests/src/FunctionalJavascript/DateRangeFieldTest.php b/core/modules/datetime_range/tests/src/FunctionalJavascript/DateRangeFieldTest.php index 207fe6a74d70..355b2c97098f 100644 --- a/core/modules/datetime_range/tests/src/FunctionalJavascript/DateRangeFieldTest.php +++ b/core/modules/datetime_range/tests/src/FunctionalJavascript/DateRangeFieldTest.php @@ -9,12 +9,12 @@ use Drupal\datetime_range\Plugin\Field\FieldType\DateRangeItem; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests Daterange field. - * - * @group datetime */ +#[Group('datetime')] class DateRangeFieldTest extends WebDriverTestBase { /** diff --git a/core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php b/core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php index 375a75030a98..c1dfc0732c1f 100644 --- a/core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php +++ b/core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php @@ -5,12 +5,13 @@ declare(strict_types=1); namespace Drupal\Tests\editor\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore sulaco - /** - * @group editor + * Tests Editor Admin. */ +#[Group('editor')] class EditorAdminTest extends WebDriverTestBase { /** diff --git a/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php b/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php index d85495c8e84e..46597555851b 100644 --- a/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php +++ b/core/modules/field/tests/src/FunctionalJavascript/Boolean/BooleanFormatterSettingsTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\field\FunctionalJavascript\Boolean; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the Boolean field formatter settings. - * - * @group field */ +#[Group('field')] class BooleanFormatterSettingsTest extends WebDriverTestBase { /** diff --git a/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php b/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php index 76907277eae1..688392289aee 100644 --- a/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php +++ b/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php @@ -6,17 +6,17 @@ namespace Drupal\Tests\field\FunctionalJavascript\EntityReference; use Behat\Mink\Element\NodeElement; use Drupal\Core\Url; +use Drupal\field\Entity\FieldConfig; +use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\field_ui\Traits\FieldUiJSTestTrait; use Drupal\Tests\field_ui\Traits\FieldUiTestTrait; -use Drupal\field\Entity\FieldConfig; -use Drupal\field\Entity\FieldStorageConfig; +use PHPUnit\Framework\Attributes\Group; /** * Tests for the administrative UI. - * - * @group entity_reference */ +#[Group('entity_reference')] class EntityReferenceAdminTest extends WebDriverTestBase { use FieldUiTestTrait; diff --git a/core/modules/field/tests/src/FunctionalJavascript/MultipleValueWidgetTest.php b/core/modules/field/tests/src/FunctionalJavascript/MultipleValueWidgetTest.php index 442cbf40f1b6..4128d510e6b7 100644 --- a/core/modules/field/tests/src/FunctionalJavascript/MultipleValueWidgetTest.php +++ b/core/modules/field/tests/src/FunctionalJavascript/MultipleValueWidgetTest.php @@ -9,12 +9,12 @@ use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests widget form for a multiple value field. - * - * @group field */ +#[Group('field')] class MultipleValueWidgetTest extends WebDriverTestBase { /** diff --git a/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php b/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php index 9a9f95420e1b..85997fa3dacb 100644 --- a/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php +++ b/core/modules/field/tests/src/FunctionalJavascript/Number/NumberFieldTest.php @@ -8,12 +8,12 @@ use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\node\Entity\Node; +use PHPUnit\Framework\Attributes\Group; /** * Tests the numeric field widget. - * - * @group field */ +#[Group('field')] class NumberFieldTest extends WebDriverTestBase { /** diff --git a/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php b/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php index d6ef689ad5aa..8330f2a2acf1 100644 --- a/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php +++ b/core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\field_layout\FunctionalJavascript; use Drupal\entity_test\Entity\EntityTest; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests using field layout for entity displays. - * - * @group field_layout */ +#[Group('field_layout')] class FieldLayoutTest extends WebDriverTestBase { /** diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/DefaultValueWidgetTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/DefaultValueWidgetTest.php index ade6ff5e8b09..1a5c809b2cf0 100644 --- a/core/modules/field_ui/tests/src/FunctionalJavascript/DefaultValueWidgetTest.php +++ b/core/modules/field_ui/tests/src/FunctionalJavascript/DefaultValueWidgetTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\field_ui\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\field_ui\Traits\FieldUiJSTestTrait; use Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests the default value widget in Field UI. - * - * @group field_ui */ +#[Group('field_ui')] class DefaultValueWidgetTest extends WebDriverTestBase { use TaxonomyTestTrait; diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php index 7908418d3fb3..dc170c5ae354 100644 --- a/core/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php +++ b/core/modules/field_ui/tests/src/FunctionalJavascript/DisplayModeBundleSelectionTest.php @@ -6,12 +6,13 @@ namespace Drupal\Tests\field_ui\FunctionalJavascript; use Drupal\Core\Entity\Entity\EntityFormMode; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests the bundle selection for view & form display modes. - * - * @group field_ui */ +#[Group('field_ui')] class DisplayModeBundleSelectionTest extends WebDriverTestBase { /** @@ -66,9 +67,8 @@ class DisplayModeBundleSelectionTest extends WebDriverTestBase { * Display mode path. * @param string $custom_mode * Custom mode to test. - * - * @dataProvider providerBundleSelection */ + #[DataProvider('providerBundleSelection')] public function testBundleSelection($display_mode, $path, $custom_mode): void { $page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php index fa6cee742617..640cb9e2842b 100644 --- a/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php +++ b/core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\field_ui\FunctionalJavascript; use Drupal\entity_test\Entity\EntityTest; use Drupal\entity_test\EntityTestHelper; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the UI for entity displays. - * - * @group field_ui */ +#[Group('field_ui')] class EntityDisplayTest extends WebDriverTestBase { /** diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php index 4b6162abfc67..c5a13e49bd0a 100644 --- a/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php +++ b/core/modules/field_ui/tests/src/FunctionalJavascript/ManageDisplayTest.php @@ -8,14 +8,13 @@ use Behat\Mink\Element\NodeElement; use Drupal\Core\Entity\Entity\EntityFormDisplay; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\field_ui\Traits\FieldUiJSTestTrait; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore onewidgetfield - /** * Tests the Field UI "Manage display" and "Manage form display" screens. - * - * @group field_ui */ +#[Group('field_ui')] class ManageDisplayTest extends WebDriverTestBase { use FieldUiJSTestTrait; diff --git a/core/modules/field_ui/tests/src/FunctionalJavascript/ManageFieldsTest.php b/core/modules/field_ui/tests/src/FunctionalJavascript/ManageFieldsTest.php index 8ca2dbb9d837..ed8e1e4c2d7a 100644 --- a/core/modules/field_ui/tests/src/FunctionalJavascript/ManageFieldsTest.php +++ b/core/modules/field_ui/tests/src/FunctionalJavascript/ManageFieldsTest.php @@ -8,14 +8,13 @@ use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\field_ui\Traits\FieldUiJSTestTrait; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore horserad - /** * Tests the Field UI "Manage Fields" screens. - * - * @group field_ui */ +#[Group('field_ui')] class ManageFieldsTest extends WebDriverTestBase { use FieldUiJSTestTrait; diff --git a/core/modules/file/tests/src/FunctionalJavascript/AjaxFileManagedMultipleTest.php b/core/modules/file/tests/src/FunctionalJavascript/AjaxFileManagedMultipleTest.php index e7fb4e3e7016..a0f9f727dfed 100644 --- a/core/modules/file/tests/src/FunctionalJavascript/AjaxFileManagedMultipleTest.php +++ b/core/modules/file/tests/src/FunctionalJavascript/AjaxFileManagedMultipleTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\file\FunctionalJavascript; use Drupal\Core\Url; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests ajax upload to managed files. - * - * @group file */ +#[Group('file')] class AjaxFileManagedMultipleTest extends WebDriverTestBase { use TestFileCreationTrait { diff --git a/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php b/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php index 724b80db8e33..983e828effc3 100644 --- a/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php +++ b/core/modules/file/tests/src/FunctionalJavascript/FileFieldValidateTest.php @@ -7,15 +7,15 @@ namespace Drupal\Tests\file\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\file\Functional\FileFieldCreationTrait; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests file field validation functions. * * Values validated include the file type, max file size, max size per node, * and whether the field is required. - * - * @group file */ +#[Group('file')] class FileFieldValidateTest extends WebDriverTestBase { use FileFieldCreationTrait; diff --git a/core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetClaroThemeTest.php b/core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetClaroThemeTest.php index f8c6e315d22b..08640330942a 100644 --- a/core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetClaroThemeTest.php +++ b/core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetClaroThemeTest.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace Drupal\Tests\file\FunctionalJavascript; use Drupal\Core\Url; +use PHPUnit\Framework\Attributes\Group; /** * Tests the widget visibility settings for the Claro theme. @@ -13,9 +14,8 @@ use Drupal\Core\Url; * the changes added in _claro_preprocess_file_and_image_widget(). * * @see _claro_preprocess_file_and_image_widget() - * - * @group file */ +#[Group('file')] class FileFieldWidgetClaroThemeTest extends FileFieldWidgetTest { /** diff --git a/core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php b/core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php index ac5f8fc750ea..a545cb9ddaf4 100644 --- a/core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php +++ b/core/modules/file/tests/src/FunctionalJavascript/FileFieldWidgetTest.php @@ -9,12 +9,12 @@ use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\field_ui\Traits\FieldUiTestTrait; use Drupal\Tests\file\Functional\FileFieldCreationTrait; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests the file field widget, single and multi-valued, using AJAX upload. - * - * @group file */ +#[Group('file')] class FileFieldWidgetTest extends WebDriverTestBase { use FieldUiTestTrait; diff --git a/core/modules/file/tests/src/FunctionalJavascript/FileManagedFileElementTest.php b/core/modules/file/tests/src/FunctionalJavascript/FileManagedFileElementTest.php index 8924703c8fd6..7a0119cd6fc3 100644 --- a/core/modules/file/tests/src/FunctionalJavascript/FileManagedFileElementTest.php +++ b/core/modules/file/tests/src/FunctionalJavascript/FileManagedFileElementTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\file\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the 'managed_file' element type. - * - * @group file */ +#[Group('file')] class FileManagedFileElementTest extends WebDriverTestBase { /** diff --git a/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php b/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php index 41bbae0b789a..a32014c84925 100644 --- a/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php +++ b/core/modules/file/tests/src/FunctionalJavascript/MaximumFileSizeExceededUploadTest.php @@ -6,14 +6,14 @@ namespace Drupal\Tests\file\FunctionalJavascript; use Drupal\Component\Utility\Bytes; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; -use Drupal\Tests\TestFileCreationTrait; use Drupal\Tests\file\Functional\FileFieldCreationTrait; +use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests uploading a file that exceeds the maximum file size. - * - * @group file */ +#[Group('file')] class MaximumFileSizeExceededUploadTest extends WebDriverTestBase { use FileFieldCreationTrait; diff --git a/core/modules/filter/src/Plugin/migrate/process/FilterID.php b/core/modules/filter/src/Plugin/migrate/process/FilterID.php index f88c1fa830b1..4981a4b42644 100644 --- a/core/modules/filter/src/Plugin/migrate/process/FilterID.php +++ b/core/modules/filter/src/Plugin/migrate/process/FilterID.php @@ -114,438 +114,216 @@ class FilterID extends StaticMap implements ContainerFactoryPluginInterface { * @see \Drupal\filter\Plugin\FilterInterface::getType() */ protected static function getSourceFilterType($filter_id) { - switch ($filter_id) { - // Drupal 7 core filters. - // - https://git.drupalcode.org/project/drupal/blob/7.69/modules/filter/filter.module#L1229 - // - https://git.drupalcode.org/project/drupal/blob/7.69/modules/php/php.module#L139 - case 'filter_html': - return FilterInterface::TYPE_HTML_RESTRICTOR; - - case 'filter_url': - return FilterInterface::TYPE_MARKUP_LANGUAGE; - - case 'filter_autop': - return FilterInterface::TYPE_MARKUP_LANGUAGE; - - case 'filter_htmlcorrector': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - - case 'filter_html_escape': - return FilterInterface::TYPE_HTML_RESTRICTOR; - - case 'php_code': - return FilterInterface::TYPE_MARKUP_LANGUAGE; - + // Drupal 7 core filters. + // - https://git.drupalcode.org/project/drupal/blob/7.69/modules/filter/filter.module#L1229 + // - https://git.drupalcode.org/project/drupal/blob/7.69/modules/php/php.module#L139 + return match ($filter_id) { + 'filter_html' => FilterInterface::TYPE_HTML_RESTRICTOR, + 'filter_url' => FilterInterface::TYPE_MARKUP_LANGUAGE, + 'filter_autop' => FilterInterface::TYPE_MARKUP_LANGUAGE, + 'filter_htmlcorrector' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, + 'filter_html_escape' => FilterInterface::TYPE_HTML_RESTRICTOR, + 'php_code' => FilterInterface::TYPE_MARKUP_LANGUAGE, // Drupal 7 contrib filters. // https://www.drupal.org/project/abbrfilter - case 'abbrfilter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'abbrfilter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/ace_editor - case 'ace_editor': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'ace_editor' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/adsense - case 'adsense': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'adsense' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/api - case 'api_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'api_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/api_tokens - case 'api_tokens': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'api_tokens' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/autofloat - case 'filter_autofloat': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_autofloat' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/bbcode - case 'bbcode': - return FilterInterface::TYPE_MARKUP_LANGUAGE; - + 'bbcode' => FilterInterface::TYPE_MARKUP_LANGUAGE, // https://www.drupal.org/project/biblio - case 'biblio_filter_reference': - case 'biblio_filter_inline_reference': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'biblio_filter_reference', 'biblio_filter_inline_reference' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/caption - case 'caption': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'caption' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/caption_filter - case 'caption_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'caption_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/cincopa - case 'filter_cincopa': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_cincopa' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/ckeditor_blocks - case 'ckeditor_blocks': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'ckeditor_blocks' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/ckeditor_filter - case 'ckeditor_filter': - return FilterInterface::TYPE_HTML_RESTRICTOR; - + 'ckeditor_filter' => FilterInterface::TYPE_HTML_RESTRICTOR, // https://www.drupal.org/project/ckeditor_link - case 'ckeditor_link_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'ckeditor_link_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/ckeditor_swf - case 'ckeditor_swf_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'ckeditor_swf_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/codefilter - case 'codefilter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'codefilter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/collapse_text - case 'collapse_text_filter': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'collapse_text_filter' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/columns_filter - case 'columns_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'columns_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/commonmark - case 'commonmark': - return FilterInterface::TYPE_MARKUP_LANGUAGE; - + 'commonmark' => FilterInterface::TYPE_MARKUP_LANGUAGE, // https://www.drupal.org/project/commons_hashtags - case 'filter_hashtags': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_hashtags' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/deepzoom - case 'deepzoom': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'deepzoom' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/editor - case 'editor_align': - case 'editor_caption': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'editor_align', 'editor_caption' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/elf - case 'elf': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'elf' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/emogrifier - case 'filter_emogrifier': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_emogrifier' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/emptyparagraphkiller - case 'emptyparagraphkiller': - return FilterInterface::TYPE_HTML_RESTRICTOR; - + 'emptyparagraphkiller' => FilterInterface::TYPE_HTML_RESTRICTOR, // https://www.drupal.org/project/entity_embed - case 'entity_embed': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - - case 'filter_align': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'entity_embed' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, + 'filter_align' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/ext_link_page - case 'ext_link_page': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'ext_link_page' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/filter_html_image_secure - case 'filter_html_image_secure': - return FilterInterface::TYPE_HTML_RESTRICTOR; - + 'filter_html_image_secure' => FilterInterface::TYPE_HTML_RESTRICTOR, // https://www.drupal.org/project/filter_transliteration - case 'filter_transliteration': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_transliteration' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/flickr - case 'flickr_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'flickr_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/float_filter - case 'float_filter': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'float_filter' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/footnotes - case 'filter_footnotes': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_footnotes' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/forena - case 'forena_report': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'forena_report' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/g2 - case 'filter_g2': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_g2' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/geo_filter - case 'geo_filter_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'geo_filter_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/google_analytics_counter - case 'filter_google_analytics_counter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_google_analytics_counter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/google_analytics_referrer - case 'filter_google_analytics_referrer': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_google_analytics_referrer' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/gotwo - case 'gotwo_link': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'gotwo_link' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/h5p - case 'h5p_content': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'h5p_content' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/highlightjs - case 'highlight_js': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'highlight_js' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/htmLawed - case 'htmLawed': - return FilterInterface::TYPE_HTML_RESTRICTOR; - + 'htmLawed' => FilterInterface::TYPE_HTML_RESTRICTOR, // https://www.drupal.org/project/htmlpurifier - case 'htmlpurifier_basic': - case 'htmlpurifier_advanced': - return FilterInterface::TYPE_HTML_RESTRICTOR; - + 'htmlpurifier_basic', 'htmlpurifier_advanced' => FilterInterface::TYPE_HTML_RESTRICTOR, // https://www.drupal.org/project/htmltidy - case 'htmltidy': - return FilterInterface::TYPE_HTML_RESTRICTOR; - + 'htmltidy' => FilterInterface::TYPE_HTML_RESTRICTOR, // https://www.drupal.org/project/icon - case 'icon_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'icon_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/iframe_filter - case 'iframe': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'iframe' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/image_resize_filter - case 'image_resize_filter': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'image_resize_filter' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/insert_view - case 'insert_view': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'insert_view' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/intlinks - case 'intlinks title': - case 'intlinks hide bad': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'intlinks title', 'intlinks hide bad' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/jquery_ui_filter - case 'accordion': - case 'dialog': - case 'tabs': - return FilterInterface::TYPE_MARKUP_LANGUAGE; - + 'accordion', 'dialog', 'tabs' => FilterInterface::TYPE_MARKUP_LANGUAGE, // https://www.drupal.org/project/language_sections - case 'language_sections': - return FilterInterface::TYPE_MARKUP_LANGUAGE; - + 'language_sections' => FilterInterface::TYPE_MARKUP_LANGUAGE, // https://www.drupal.org/project/lazy - case 'lazy_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'lazy_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/lazyloader_filter - case 'lazyloader_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'lazyloader_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/link_node - case 'filter_link_node': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_link_node' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/linktitle - case 'linktitle': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'linktitle' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/markdown - case 'filter_markdown': - return FilterInterface::TYPE_MARKUP_LANGUAGE; - + 'filter_markdown' => FilterInterface::TYPE_MARKUP_LANGUAGE, // https://www.drupal.org/project/media_wysiwyg - case 'media_filter': - case 'media_filter_paragraph_fix': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'media_filter', 'media_filter_paragraph_fix' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/mentions - case 'filter_mentions': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_mentions' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/menu_filter - case 'menu_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'menu_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/mobile_codes - case 'mobile_codes': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'mobile_codes' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/multicolumn - case 'multicolumn': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'multicolumn' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/multilink - case 'multilink_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'multilink_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/mytube - case 'mytube': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'mytube' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/node_embed - case 'node_embed': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'node_embed' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/node_field_embed - case 'node_field_embed': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'node_field_embed' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/noindex_external_links - case 'external_links': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'external_links' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/noreferrer - case 'noreferrer': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'noreferrer' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/oembed - case 'oembed': - case 'oembed_legacy': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'oembed', 'oembed_legacy' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/office_html - case 'office_html_strip': - return FilterInterface::TYPE_HTML_RESTRICTOR; - - case 'office_html_convert': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'office_html_strip' => FilterInterface::TYPE_HTML_RESTRICTOR, + 'office_html_convert' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/openlayers_filters - case 'openlayers': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'openlayers' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/opengraph_filter - case 'opengraph_filter': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'opengraph_filter' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/pathologic - case 'pathologic': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'pathologic' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/popup - case 'popup_tags': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'popup_tags' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/prettify - case 'prettify': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'prettify' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/rel_to_abs - case 'rel_to_abs': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'rel_to_abs' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/rollover_filter - case 'rollover_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'rollover_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/sanitizable - case 'sanitizable': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'sanitizable' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/smart_paging - case 'smart_paging_filter': - case 'smart_paging_filter_autop': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'smart_paging_filter', 'smart_paging_filter_autop' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/spamspan - case 'spamspan': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'spamspan' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/scald - case 'mee_scald_widgets': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'mee_scald_widgets' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/script_filter - case 'script_filter': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'script_filter' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/shortcode - case 'shortcode': - return FilterInterface::TYPE_MARKUP_LANGUAGE; - - case 'shortcode_text_corrector': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'shortcode' => FilterInterface::TYPE_MARKUP_LANGUAGE, + 'shortcode_text_corrector' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/smiley - case 'smiley': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'smiley' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/svg_embed - case 'filter_svg_embed': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_svg_embed' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/spoiler - case 'spoiler': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'spoiler' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/tableofcontents - case 'filter_toc': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_toc' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/tables - case 'filter_tables': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_tables' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/target_filter_url - case 'target_filter_url': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'target_filter_url' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/textile - case 'textile': - return FilterInterface::TYPE_MARKUP_LANGUAGE; - + 'textile' => FilterInterface::TYPE_MARKUP_LANGUAGE, // https://www.drupal.org/project/theme_filter - case 'theme_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'theme_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/token_filter - case 'filter_tokens': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'filter_tokens' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/transliteration - case 'transliteration': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'transliteration' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/typogrify - case 'typogrify': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'typogrify' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/uuid_link - case 'uuid_link_filter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'uuid_link_filter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/wysiwyg - case 'wysiwyg': - case 'wysiwyg_template_cleanup': - return FilterInterface::TYPE_HTML_RESTRICTOR; - + 'wysiwyg', 'wysiwyg_template_cleanup' => FilterInterface::TYPE_HTML_RESTRICTOR, // https://www.drupal.org/project/word_link - case 'word_link': - return FilterInterface::TYPE_TRANSFORM_REVERSIBLE; - + 'word_link' => FilterInterface::TYPE_TRANSFORM_REVERSIBLE, // https://www.drupal.org/project/wordfilter - case 'wordfilter': - return FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE; - + 'wordfilter' => FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE, // https://www.drupal.org/project/xbbcode - case 'xbbcode': - return FilterInterface::TYPE_MARKUP_LANGUAGE; - } - - return NULL; + 'xbbcode' => FilterInterface::TYPE_MARKUP_LANGUAGE, + default => NULL, + }; } } diff --git a/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php b/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php index 2da7f3edd9b1..a417b1727ca3 100644 --- a/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php +++ b/core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\image\FunctionalJavascript; use Drupal\image\Entity\ImageStyle; +use PHPUnit\Framework\Attributes\Group; /** * Tests creation, deletion, and editing of image styles and effects. - * - * @group image */ +#[Group('image')] class ImageAdminStylesTest extends ImageFieldTestBase { /** diff --git a/core/modules/image/tests/src/FunctionalJavascript/ImageFieldValidateTest.php b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldValidateTest.php index 9c9839b15c67..4e4f0021e3e9 100644 --- a/core/modules/image/tests/src/FunctionalJavascript/ImageFieldValidateTest.php +++ b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldValidateTest.php @@ -4,14 +4,14 @@ declare(strict_types=1); namespace Drupal\Tests\image\FunctionalJavascript; -use Drupal\field\Entity\FieldStorageConfig; use Drupal\field\Entity\FieldConfig; +use Drupal\field\Entity\FieldStorageConfig; +use PHPUnit\Framework\Attributes\Group; /** * Tests validation functions such as min/max dimensions. - * - * @group image */ +#[Group('image')] class ImageFieldValidateTest extends ImageFieldTestBase { /** diff --git a/core/modules/image/tests/src/FunctionalJavascript/ImageFieldWidgetMultipleTest.php b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldWidgetMultipleTest.php index ac253b33b39f..8c1a637e93b4 100644 --- a/core/modules/image/tests/src/FunctionalJavascript/ImageFieldWidgetMultipleTest.php +++ b/core/modules/image/tests/src/FunctionalJavascript/ImageFieldWidgetMultipleTest.php @@ -9,12 +9,12 @@ use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\node\Entity\Node; use Drupal\Tests\image\Kernel\ImageFieldCreationTrait; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests the image field widget support multiple upload correctly. - * - * @group image */ +#[Group('image')] class ImageFieldWidgetMultipleTest extends WebDriverTestBase { use ImageFieldCreationTrait; diff --git a/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditor5Test.php b/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditor5Test.php index 340423c71beb..063356bc161d 100644 --- a/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditor5Test.php +++ b/core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerCKEditor5Test.php @@ -12,12 +12,12 @@ use Drupal\filter\Entity\FilterFormat; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\node\Entity\NodeType; use Drupal\user\RoleInterface; +use PHPUnit\Framework\Attributes\Group; /** * Tests the inline errors fragment link to a CKEditor5-enabled textarea. - * - * @group ckeditor5 */ +#[Group('ckeditor5')] class FormErrorHandlerCKEditor5Test extends WebDriverTestBase { /** diff --git a/core/modules/jsonapi/tests/src/FunctionalJavascript/JsonApiPerformanceTest.php b/core/modules/jsonapi/tests/src/FunctionalJavascript/JsonApiPerformanceTest.php index b1b0934b5da3..6c69e60f404a 100644 --- a/core/modules/jsonapi/tests/src/FunctionalJavascript/JsonApiPerformanceTest.php +++ b/core/modules/jsonapi/tests/src/FunctionalJavascript/JsonApiPerformanceTest.php @@ -6,14 +6,15 @@ namespace Drupal\Tests\jsonapi\FunctionalJavascript; use Drupal\Core\Url; use Drupal\FunctionalJavascriptTests\PerformanceTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; /** * Tests performance for JSON:API routes. - * - * @group Common - * @group #slow - * @requires extension apcu */ +#[Group('Common')] +#[Group('#slow')] +#[RequiresPhpExtension('apcu')] class JsonApiPerformanceTest extends PerformanceTestBase { /** diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php index bf33b3d7c789..13cbab6fdfbf 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/AjaxBlockTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\layout_builder\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; use Drupal\Tests\system\Traits\OffCanvasTestTrait; +use PHPUnit\Framework\Attributes\Group; /** * Ajax blocks tests. - * - * @group layout_builder */ +#[Group('layout_builder')] class AjaxBlockTest extends WebDriverTestBase { use OffCanvasTestTrait; diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php index 92d95a84908e..8fa2fa1dec5d 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php @@ -7,13 +7,14 @@ namespace Drupal\Tests\layout_builder\FunctionalJavascript; use Behat\Mink\Element\NodeElement; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; /** * Tests the JavaScript functionality of the block add filter. - * - * @group layout_builder - * @group legacy */ +#[Group('layout_builder')] +#[IgnoreDeprecations] class BlockFilterTest extends WebDriverTestBase { /** diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php index c07b69de1efe..555af66c86c7 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFormMessagesTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\layout_builder\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests that messages appear in the off-canvas dialog with configuring blocks. - * - * @group layout_builder */ +#[Group('layout_builder')] class BlockFormMessagesTest extends WebDriverTestBase { use ContextualLinkClickTrait; diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php index 333ae6282926..476ec728fa48 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContentPreviewToggleTest.php @@ -8,14 +8,13 @@ use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait; use Drupal\Tests\system\Traits\OffCanvasTestTrait; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore blocknodebundle testbody - /** * Tests toggling of content preview. - * - * @group layout_builder */ +#[Group('layout_builder')] class ContentPreviewToggleTest extends WebDriverTestBase { use ContextualLinkClickTrait; diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php index efa1b1ba979d..fb62f1bed6f2 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/ContextualLinksTest.php @@ -7,14 +7,13 @@ namespace Drupal\Tests\layout_builder\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; use Drupal\Tests\system\Functional\Cache\AssertPageCacheContextsAndTagsTrait; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore blocktest - /** * Test contextual links compatibility with the Layout Builder. - * - * @group layout_builder */ +#[Group('layout_builder')] class ContextualLinksTest extends WebDriverTestBase { use AssertPageCacheContextsAndTagsTrait; diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php index 75fdf40097c5..37c733435cd4 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php @@ -7,15 +7,18 @@ namespace Drupal\Tests\layout_builder\FunctionalJavascript; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use Drupal\layout_builder\Plugin\Block\FieldBlock; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; // cspell:ignore datefield - /** - * @coversDefaultClass \Drupal\layout_builder\Plugin\Block\FieldBlock - * - * @group field - * @group legacy + * Tests Drupal\layout_builder\Plugin\Block\FieldBlock. */ +#[CoversClass(FieldBlock::class)] +#[Group('field')] +#[IgnoreDeprecations] class FieldBlockTest extends WebDriverTestBase { /** diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php index 97808e73b697..66e6a3d6a6c7 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php @@ -11,12 +11,12 @@ use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; use Drupal\Tests\file\Functional\FileFieldCreationTrait; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Test access to private files in block fields on the Layout Builder. - * - * @group layout_builder */ +#[Group('layout_builder')] class InlineBlockPrivateFilesTest extends InlineBlockTestBase { use FileFieldCreationTrait; diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php index 2dcbbf645e5c..9097e244c18f 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php @@ -6,13 +6,14 @@ namespace Drupal\Tests\layout_builder\FunctionalJavascript; use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; use Drupal\node\Entity\Node; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests that the inline block feature works correctly. - * - * @group layout_builder - * @group #slow */ +#[Group('layout_builder')] +#[Group('#slow')] class InlineBlockTest extends InlineBlockTestBase { /** @@ -113,9 +114,8 @@ class InlineBlockTest extends InlineBlockTestBase { /** * Tests adding a new entity block and then not saving the layout. - * - * @dataProvider layoutNoSaveProvider */ + #[DataProvider('layoutNoSaveProvider')] public function testNoLayoutSave($operation, $no_save_button_text, $confirm_button_text): void { $this->drupalLogin($this->drupalCreateUser([ 'access contextual links', diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/ItemLayoutFieldBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/ItemLayoutFieldBlockTest.php index 4bb6313816f1..217347b46921 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/ItemLayoutFieldBlockTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/ItemLayoutFieldBlockTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\layout_builder\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; +use PHPUnit\Framework\Attributes\Group; /** * Field blocks tests for the override layout. - * - * @group layout_builder */ +#[Group('layout_builder')] class ItemLayoutFieldBlockTest extends WebDriverTestBase { /** diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php index dc44888a8b20..003248030d57 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderDisableInteractionsTest.php @@ -11,15 +11,14 @@ use Drupal\FunctionalJavascriptTests\JSWebAssert; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait; use Drupal\Tests\system\Traits\OffCanvasTestTrait; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore blocknodebundle fieldbody - /** * Tests the Layout Builder disables interactions of rendered blocks. - * - * @group layout_builder - * @group #slow */ +#[Group('layout_builder')] +#[Group('#slow')] class LayoutBuilderDisableInteractionsTest extends WebDriverTestBase { use ContextualLinkClickTrait; diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php index 6cb5b136b876..f7d0f2a6dd69 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderNestedFormUiTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\layout_builder\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests placing blocks containing forms in theLayout Builder UI. - * - * @group layout_builder */ +#[Group('layout_builder')] class LayoutBuilderNestedFormUiTest extends WebDriverTestBase { /** diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php index f5e106cfc9ac..55b3de28f6fb 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderOptInTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\layout_builder\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\layout_builder\Traits\EnableLayoutBuilderTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests the ability for opting in and out of Layout Builder. - * - * @group layout_builder */ +#[Group('layout_builder')] class LayoutBuilderOptInTest extends WebDriverTestBase { use EnableLayoutBuilderTrait; diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php index fb237f03a226..33fe433ad319 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php @@ -10,12 +10,12 @@ use Drupal\Core\Url; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait; use Drupal\Tests\system\Traits\OffCanvasTestTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests the Layout Builder UI. - * - * @group layout_builder */ +#[Group('layout_builder')] class LayoutBuilderTest extends WebDriverTestBase { use ContextualLinkClickTrait; diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php index 5e0155ae06d7..9e7b73fad534 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderToolbarTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\layout_builder\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Test Layout Builder integration with Toolbar. - * - * @group layout_builder */ +#[Group('layout_builder')] class LayoutBuilderToolbarTest extends WebDriverTestBase { /** diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php index a9205d9f0dc3..f32176718220 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php @@ -7,14 +7,13 @@ namespace Drupal\Tests\layout_builder\FunctionalJavascript; use Drupal\block_content\Entity\BlockContentType; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore blocknodebundle fieldbody fieldlayout - /** * Tests the Layout Builder UI. - * - * @group layout_builder */ +#[Group('layout_builder')] class LayoutBuilderUiTest extends WebDriverTestBase { use ContextualLinkClickTrait; diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php index df748df0e080..238f1d4723c3 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/MoveBlockFormTest.php @@ -8,14 +8,13 @@ use Behat\Mink\Element\NodeElement; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore blocknodebundle fieldbody fieldlinks - /** * Tests moving blocks via the form. - * - * @group layout_builder */ +#[Group('layout_builder')] class MoveBlockFormTest extends WebDriverTestBase { use ContextualLinkClickTrait; diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/TestMultiWidthLayoutsTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/TestMultiWidthLayoutsTest.php index c7037f99391f..7e225dcf73d2 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/TestMultiWidthLayoutsTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/TestMultiWidthLayoutsTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\layout_builder\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; +use PHPUnit\Framework\Attributes\Group; /** * Test the multi-width layout plugins. - * - * @group layout_builder */ +#[Group('layout_builder')] class TestMultiWidthLayoutsTest extends WebDriverTestBase { /** diff --git a/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php b/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php index be20978ea8f0..2942c03c71b7 100644 --- a/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php +++ b/core/modules/link/tests/src/FunctionalJavascript/LinkFieldFormStatesTest.php @@ -5,13 +5,14 @@ declare(strict_types=1); namespace Drupal\Tests\link\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests link field form states functionality. - * - * @group link - * @group #slow */ +#[Group('link')] +#[Group('#slow')] class LinkFieldFormStatesTest extends WebDriverTestBase { /** @@ -40,8 +41,9 @@ class LinkFieldFormStatesTest extends WebDriverTestBase { } /** - * @dataProvider linkFieldFormStatesData - */ + * Tests link field form states. + */ + #[DataProvider('linkFieldFormStatesData')] public function testLinkFieldFormStates(string $uri, string $title): void { $this->drupalGet('entity_test/add'); $session = $this->assertSession(); diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php index b1fc5baaf7d1..22fe95ece623 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php @@ -11,12 +11,12 @@ use Drupal\field\Entity\FieldStorageConfig; use Drupal\media\Entity\Media; use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; +use PHPUnit\Framework\Attributes\Group; /** * Basic display tests for Media. - * - * @group media */ +#[Group('media')] class MediaDisplayTest extends MediaJavascriptTestBase { /** diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiAddTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiAddTest.php index 554fc35e37c5..4825687abfa8 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiAddTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiAddTest.php @@ -4,17 +4,24 @@ declare(strict_types=1); namespace Drupal\Tests\media\FunctionalJavascript; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; + /** - * @covers ::media_filter_format_edit_form_validate - * @group media - * @group #slow + * Tests Media Embed Filter Configuration Ui Add. + * + * @legacy-covers ::media_filter_format_edit_form_validate */ +#[Group('media')] +#[Group('#slow')] class MediaEmbedFilterConfigurationUiAddTest extends MediaEmbedFilterTestBase { /** - * @covers \Drupal\media\Hook\MediaHooks::formFilterFormatAddFormAlter - * @dataProvider providerTestValidations + * Tests validation when adding. + * + * @legacy-covers \Drupal\media\Hook\MediaHooks::formFilterFormatAddFormAlter */ + #[DataProvider('providerTestValidations')] public function testValidationWhenAdding($filter_html_status, $filter_align_status, $filter_caption_status, $filter_html_image_secure_status, $media_embed, $allowed_html, $expected_error_message): void { $this->drupalGet('admin/config/content/formats/add'); diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiEditTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiEditTest.php index bcc62c736216..ce006de76eca 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiEditTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiEditTest.php @@ -4,17 +4,24 @@ declare(strict_types=1); namespace Drupal\Tests\media\FunctionalJavascript; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; + /** - * @covers ::media_filter_format_edit_form_validate - * @group media - * @group #slow + * Tests Media Embed Filter Configuration Ui Edit. + * + * @legacy-covers ::media_filter_format_edit_form_validate */ +#[Group('media')] +#[Group('#slow')] class MediaEmbedFilterConfigurationUiEditTest extends MediaEmbedFilterTestBase { /** - * @covers \Drupal\media\Hook\MediaHooks::formFilterFormatEditFormAlter - * @dataProvider providerTestValidations + * Tests validation when editing. + * + * @legacy-covers \Drupal\media\Hook\MediaHooks::formFilterFormatEditFormAlter */ + #[DataProvider('providerTestValidations')] public function testValidationWhenEditing($filter_html_status, $filter_align_status, $filter_caption_status, $filter_html_image_secure_status, $media_embed, $allowed_html, $expected_error_message): void { $this->drupalGet('admin/config/content/formats/manage/media_embed_test'); diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaReferenceFieldHelpTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaReferenceFieldHelpTest.php index 80d438685ddd..383ea8e7a605 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaReferenceFieldHelpTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaReferenceFieldHelpTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\Tests\media\FunctionalJavascript; +use PHPUnit\Framework\Attributes\Group; + /** * Tests related to media reference fields. - * - * @group media */ +#[Group('media')] class MediaReferenceFieldHelpTest extends MediaJavascriptTestBase { /** diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceAudioVideoTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceAudioVideoTest.php index 24c071a501ca..379ff5f1b358 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceAudioVideoTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceAudioVideoTest.php @@ -8,12 +8,12 @@ use Drupal\Core\Entity\Entity\EntityViewDisplay; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\file\Entity\File; +use PHPUnit\Framework\Attributes\Group; /** * Tests the Audio and Video media sources. - * - * @group media */ +#[Group('media')] class MediaSourceAudioVideoTest extends MediaSourceTestBase { /** diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceFileTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceFileTest.php index dfb784ba073f..6d658a38815d 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceFileTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceFileTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\media\FunctionalJavascript; use Drupal\media\Entity\Media; use Drupal\media\Plugin\media\Source\File; +use PHPUnit\Framework\Attributes\Group; /** * Tests the file media source. - * - * @group media */ +#[Group('media')] class MediaSourceFileTest extends MediaSourceTestBase { /** diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php index a21aec350126..8e9a32cab5cd 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php @@ -12,12 +12,12 @@ use Drupal\media\Entity\MediaType; use Drupal\media\Plugin\media\Source\Image; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; +use PHPUnit\Framework\Attributes\Group; /** * Tests the image media source. - * - * @group media */ +#[Group('media')] class MediaSourceImageTest extends MediaSourceTestBase { /** diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php index fdbf1151882e..67ffe424eab2 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php @@ -4,23 +4,22 @@ declare(strict_types=1); namespace Drupal\Tests\media\FunctionalJavascript; -use Drupal\Core\Session\AccountInterface; use Drupal\Core\Database\Database; +use Drupal\Core\Session\AccountInterface; use Drupal\dblog\Controller\DbLogController; use Drupal\media\Entity\Media; use Drupal\media\Entity\MediaType; use Drupal\media_test_oembed\Controller\ResourceController; use Drupal\Tests\media\Traits\OEmbedTestTrait; use Drupal\user\Entity\Role; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\DependencyInjection\ContainerInterface; // cspell:ignore dailymotion Schipulcon - /** * Tests the oembed:video media source. - * - * @group media */ +#[Group('media')] class MediaSourceOEmbedVideoTest extends MediaSourceTestBase { /** diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php index 72fa18190b75..36585f409aae 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php @@ -11,14 +11,13 @@ use Drupal\field\Entity\FieldStorageConfig; use Drupal\media_test_oembed\Controller\ResourceController; use Drupal\node\Entity\Node; use Drupal\Tests\media\Traits\OEmbedTestTrait; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore Drupalin Hustlin Schipulcon - /** * Basic tests for Media configuration in the standard profile. - * - * @group media */ +#[Group('media')] class MediaStandardProfileTest extends MediaJavascriptTestBase { use OEmbedTestTrait; diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaTypeCreationTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaTypeCreationTest.php index 699d97e9a181..0a2fa8c4a3c3 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaTypeCreationTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaTypeCreationTest.php @@ -5,14 +5,13 @@ declare(strict_types=1); namespace Drupal\Tests\media\FunctionalJavascript; use Drupal\Component\Utility\Html; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore pastafazoul - /** * Tests the media type creation. - * - * @group media */ +#[Group('media')] class MediaTypeCreationTest extends MediaJavascriptTestBase { /** diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php index 757242234234..a648eaaa8de6 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaUiJavascriptTest.php @@ -8,12 +8,12 @@ use Drupal\field\FieldConfigInterface; use Drupal\media\Entity\Media; use Drupal\media\Entity\MediaType; use Drupal\media\MediaSourceInterface; +use PHPUnit\Framework\Attributes\Group; /** * Ensures that media UI works correctly. - * - * @group media */ +#[Group('media')] class MediaUiJavascriptTest extends MediaJavascriptTestBase { /** diff --git a/core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php b/core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php index 1654f5879b2d..da0b9fa9ef8a 100644 --- a/core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php +++ b/core/modules/media/tests/src/FunctionalJavascript/MediaViewsWizardTest.php @@ -5,15 +5,15 @@ declare(strict_types=1); namespace Drupal\Tests\media\FunctionalJavascript; use Drupal\views\Views; +use PHPUnit\Framework\Attributes\Group; /** * Tests the media entity type integration into the wizard. * - * @group media - * * @see \Drupal\media\Plugin\views\wizard\Media * @see \Drupal\media\Plugin\views\wizard\MediaRevision */ +#[Group('media')] class MediaViewsWizardTest extends MediaJavascriptTestBase { /** diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php index 28f123a946c4..0bdb75e7ec1d 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/ContentModerationTest.php @@ -12,14 +12,13 @@ use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait; use Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait; use Drupal\Tests\media\Traits\MediaTypeCreationTrait; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore hoglet - /** * Tests media library integration with content moderation. - * - * @group media_library */ +#[Group('media_library')] class ContentModerationTest extends WebDriverTestBase { use ContentModerationTestTrait; diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php index 1fb1b9a93528..7e51adf769c8 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/EmbeddedFormWidgetTest.php @@ -9,12 +9,13 @@ use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\media\Entity\Media; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests media widget nested inside another widget. - * - * @group media_library */ +#[Group('media_library')] class EmbeddedFormWidgetTest extends WebDriverTestBase { use TestFileCreationTrait; @@ -94,9 +95,8 @@ class EmbeddedFormWidgetTest extends WebDriverTestBase { /** * Tests media inside another widget that validates too enthusiastically. - * - * @dataProvider insertionReselectionProvider */ + #[DataProvider('insertionReselectionProvider')] public function testInsertionAndReselection($widget): void { $this->container ->get('entity_display.repository') diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php index ea476c9ee96e..bb02c1eca7dc 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/EntityReferenceWidgetTest.php @@ -8,12 +8,12 @@ use Drupal\field\Entity\FieldConfig; use Drupal\FunctionalJavascriptTests\SortableTestTrait; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; +use PHPUnit\Framework\Attributes\Group; /** * Tests the Media library entity reference widget. - * - * @group media_library */ +#[Group('media_library')] class EntityReferenceWidgetTest extends MediaLibraryTestBase { use SortableTestTrait; diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/FieldUiIntegrationTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/FieldUiIntegrationTest.php index 7bd1e52628e6..1b1378c16aa4 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/FieldUiIntegrationTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/FieldUiIntegrationTest.php @@ -4,13 +4,13 @@ declare(strict_types=1); namespace Drupal\Tests\media_library\FunctionalJavascript; -// cspell:ignore shatner +use PHPUnit\Framework\Attributes\Group; +// cspell:ignore shatner /** * Tests field UI integration for media library widget. - * - * @group media_library */ +#[Group('media_library')] class FieldUiIntegrationTest extends MediaLibraryTestBase { /** diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php index a88502c65961..535edb25fb0d 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\Tests\media_library\FunctionalJavascript; +use PHPUnit\Framework\Attributes\Group; + /** * Tests the grid-style media overview page. - * - * @group media_library */ +#[Group('media_library')] class MediaOverviewTest extends MediaLibraryTestBase { /** diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/TranslationsTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/TranslationsTest.php index f3dbb33ad1bd..0d389b472fe4 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/TranslationsTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/TranslationsTest.php @@ -12,12 +12,12 @@ use Drupal\media\Entity\Media; use Drupal\Tests\field\Traits\EntityReferenceFieldCreationTrait; use Drupal\Tests\media\Traits\MediaTypeCreationTrait; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests media library for translatable media. - * - * @group media_library */ +#[Group('media_library')] class TranslationsTest extends WebDriverTestBase { use EntityReferenceFieldCreationTrait; diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/ViewsUiIntegrationTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/ViewsUiIntegrationTest.php index 73df14ec6fc1..69043cdd0e2c 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/ViewsUiIntegrationTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/ViewsUiIntegrationTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\Tests\media_library\FunctionalJavascript; +use PHPUnit\Framework\Attributes\Group; + /** * Tests Media Library's integration with Views UI. - * - * @group media_library */ +#[Group('media_library')] class ViewsUiIntegrationTest extends MediaLibraryTestBase { /** diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAccessTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAccessTest.php index 78f4d6acf008..8e2c4411af22 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAccessTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAccessTest.php @@ -9,12 +9,12 @@ use Drupal\media\Entity\Media; use Drupal\media_library\MediaLibraryState; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; +use PHPUnit\Framework\Attributes\Group; /** * Tests the media library UI access. - * - * @group media_library */ +#[Group('media_library')] class WidgetAccessTest extends MediaLibraryTestBase { /** diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAnonymousTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAnonymousTest.php index d7efb311cda3..56a7ddd90085 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAnonymousTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetAnonymousTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\media_library\FunctionalJavascript; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; +use PHPUnit\Framework\Attributes\Group; /** * Tests that the widget works as expected for anonymous users. - * - * @group media_library */ +#[Group('media_library')] class WidgetAnonymousTest extends MediaLibraryTestBase { /** diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php index 1d53128b7047..d6b141f8a8d7 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php @@ -7,14 +7,13 @@ namespace Drupal\Tests\media_library\FunctionalJavascript; use Drupal\media\Entity\Media; use Drupal\media_test_oembed\Controller\ResourceController; use Drupal\Tests\media\Traits\OEmbedTestTrait; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore Drupalin Hustlin Schipulcon - /** * Tests that oEmbed media can be added in the Media library's widget. - * - * @group media_library */ +#[Group('media_library')] class WidgetOEmbedTest extends MediaLibraryTestBase { use OEmbedTestTrait; diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOverflowTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOverflowTest.php index 8a13b0e070cf..08ec7dd7f5f9 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOverflowTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOverflowTest.php @@ -5,16 +5,17 @@ declare(strict_types=1); namespace Drupal\Tests\media_library\FunctionalJavascript; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests that uploads in the 'media_library_widget' works as expected. * - * @group media_library - * @group #slow - * * @todo This test will occasionally fail with SQLite until * https://www.drupal.org/node/3066447 is addressed. */ +#[Group('media_library')] +#[Group('#slow')] class WidgetOverflowTest extends MediaLibraryTestBase { use TestFileCreationTrait; @@ -95,9 +96,8 @@ class WidgetOverflowTest extends MediaLibraryTestBase { * The operation of the button to click. For example, if this is "insert", * the "Save and insert" button will be pressed. If NULL, the "Save" button * will be pressed. - * - * @dataProvider providerWidgetOverflow */ + #[DataProvider('providerWidgetOverflow')] public function testWidgetOverflow(?string $selected_operation): void { // If we want to press the "Save and insert" or "Save and select" buttons, // we need to enable the advanced UI. @@ -138,9 +138,8 @@ class WidgetOverflowTest extends MediaLibraryTestBase { * The operation of the button to click. For example, if this is "insert", * the "Save and insert" button will be pressed. If NULL, the "Save" button * will be pressed. - * - * @dataProvider providerWidgetOverflow */ + #[DataProvider('providerWidgetOverflow')] public function testUnlimitedCardinality(?string $selected_operation): void { if ($selected_operation) { $this->config('media_library.settings')->set('advanced_ui', TRUE)->save(); diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetUploadTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetUploadTest.php index 7e0b3af57f0b..86cee3e17ade 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetUploadTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetUploadTest.php @@ -6,15 +6,15 @@ namespace Drupal\Tests\media_library\FunctionalJavascript; use Drupal\media\Entity\Media; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests that uploads in the 'media_library_widget' works as expected. * - * @group media_library - * * @todo This test will occasionally fail with SQLite until * https://www.drupal.org/node/3066447 is addressed. */ +#[Group('media_library')] class WidgetUploadTest extends MediaLibraryTestBase { use TestFileCreationTrait; diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetViewsTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetViewsTest.php index 09933c865a77..868aedfed4f8 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetViewsTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetViewsTest.php @@ -4,11 +4,12 @@ declare(strict_types=1); namespace Drupal\Tests\media_library\FunctionalJavascript; +use PHPUnit\Framework\Attributes\Group; + /** * Tests the views in the media library widget. - * - * @group media_library */ +#[Group('media_library')] class WidgetViewsTest extends MediaLibraryTestBase { /** diff --git a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetWithoutTypesTest.php b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetWithoutTypesTest.php index 87eaea2af68b..1008beadcc7b 100644 --- a/core/modules/media_library/tests/src/FunctionalJavascript/WidgetWithoutTypesTest.php +++ b/core/modules/media_library/tests/src/FunctionalJavascript/WidgetWithoutTypesTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\media_library\FunctionalJavascript; use Drupal\Core\Url; use Drupal\field_ui\FieldUI; +use PHPUnit\Framework\Attributes\Group; /** * Tests the media library widget when no media types are available. - * - * @group media_library */ +#[Group('media_library')] class WidgetWithoutTypesTest extends MediaLibraryTestBase { /** diff --git a/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php b/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php index a174b7a33c1f..eddb64ab9275 100644 --- a/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php +++ b/core/modules/menu_ui/tests/src/FunctionalJavascript/MenuUiJavascriptTest.php @@ -9,12 +9,12 @@ use Drupal\system\Entity\Menu; use Drupal\system\MenuStorage; use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait; use Drupal\Tests\menu_ui\Traits\MenuUiTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests custom menu and menu links operations using the UI. - * - * @group menu_ui */ +#[Group('menu_ui')] class MenuUiJavascriptTest extends WebDriverTestBase { use ContextualLinkClickTrait; diff --git a/core/modules/migrate/src/Row.php b/core/modules/migrate/src/Row.php index 3d961902bcde..2b5e8b2fb4e6 100644 --- a/core/modules/migrate/src/Row.php +++ b/core/modules/migrate/src/Row.php @@ -267,6 +267,32 @@ class Row { } /** + * Tests if a property is an empty destination. + * + * @param string $property + * The name of the property. + * + * @return bool + * TRUE if the property is an empty destination. + */ + public function hasEmptyDestinationProperty(string $property): bool { + return in_array($property, $this->emptyDestinationProperties); + } + + /** + * Removes an empty destination property. + * + * @param string $property + * The name of the empty destination property. + */ + public function removeEmptyDestinationProperty(string $property): void { + $this->emptyDestinationProperties = array_diff( + $this->emptyDestinationProperties, + [$property], + ); + } + + /** * Returns the whole destination array. * * @return array diff --git a/core/modules/migrate/tests/src/Kernel/RowTest.php b/core/modules/migrate/tests/src/Kernel/RowTest.php new file mode 100644 index 000000000000..1b4adf181c88 --- /dev/null +++ b/core/modules/migrate/tests/src/Kernel/RowTest.php @@ -0,0 +1,152 @@ +<?php + +declare(strict_types=1); + +namespace Drupal\Tests\migrate\Kernel; + +use Drupal\Core\Entity\EntityTypeManagerInterface; +use Drupal\KernelTests\KernelTestBase; +use Drupal\migrate\Event\MigratePreRowSaveEvent; +use Drupal\migrate\Event\MigrateEvents; +use Drupal\migrate\MigrateExecutable; +use Drupal\migrate\Plugin\MigrationPluginManagerInterface; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; + +/** + * Tests the Row class. + * + * @group migrate + */ +class RowTest extends KernelTestBase { + + /** + * The event dispatcher. + */ + protected EventDispatcherInterface $eventDispatcher; + + /** + * The entity type manager. + */ + protected EntityTypeManagerInterface $entityTypeManager; + + /** + * The migration manager. + */ + protected MigrationPluginManagerInterface $migrationManager; + + /** + * {@inheritdoc} + */ + protected static $modules = [ + 'entity_test', + 'field', + 'migrate', + 'user', + ]; + + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + $this->installEntitySchema('entity_test'); + + $this->eventDispatcher = \Drupal::service('event_dispatcher'); + $this->entityTypeManager = \Drupal::service('entity_type.manager'); + $this->migrationManager = \Drupal::service('plugin.manager.migration'); + + // Create two fields that will be set during migration. + $fields = ['field1', 'field2']; + foreach ($fields as $field) { + $this->entityTypeManager->getStorage('field_storage_config')->create([ + 'entity_type' => 'entity_test', + 'field_name' => $field, + 'type' => 'string', + ])->save(); + $this->entityTypeManager->getStorage('field_config')->create([ + 'entity_type' => 'entity_test', + 'field_name' => $field, + 'bundle' => 'entity_test', + ])->save(); + } + } + + /** + * Tests the destination properties of the Row class. + */ + public function testRowDestinations(): void { + $storage = $this->entityTypeManager->getStorage('entity_test'); + + // Execute a migration that creates an entity with two fields. + $data_rows = [ + ['id' => 1, 'field1' => 'f1value', 'field2' => 'f2value'], + ]; + $ids = ['id' => ['type' => 'integer']]; + $definition = [ + 'source' => [ + 'plugin' => 'embedded_data', + 'data_rows' => $data_rows, + 'ids' => $ids, + ], + 'process' => [ + 'id' => 'id', + 'field1' => 'field1', + 'field2' => 'field2', + ], + 'destination' => ['plugin' => 'entity:entity_test'], + ]; + $this->executeMigrationImport($definition); + $entity = $storage->load(1); + $this->assertEquals('f1value', $entity->get('field1')->getValue()[0]['value']); + $this->assertEquals('f2value', $entity->get('field2')->getValue()[0]['value']); + + // Execute a second migration that attempts to remove both field values. + // The event listener prevents the removal of the second field. + $data_rows = [ + ['id' => 1, 'field1' => NULL, 'field2' => NULL], + ]; + $definition['source']['data_rows'] = $data_rows; + $this->eventDispatcher->addListener(MigrateEvents::PRE_ROW_SAVE, [$this, 'preventFieldRemoval']); + $this->executeMigrationImport($definition); + + // The first field is now empty but the second field is still set. + $entity = $storage->load(1); + $this->assertTrue($entity->get('field1')->isEmpty()); + $this->assertEquals('f2value', $entity->get('field2')->getValue()[0]['value']); + } + + /** + * The pre-row-save event handler for the second migration. + * + * Checks row destinations and prevents the removal of the second field. + * + * @param \Drupal\migrate\Event\MigratePreRowSaveEvent $event + * The migration event. + * @param string $name + * The event name. + */ + public function preventFieldRemoval(MigratePreRowSaveEvent $event, string $name): void { + $row = $event->getRow(); + + // Both fields are empty and their existing values will be removed. + $this->assertFalse($row->hasDestinationProperty('field1')); + $this->assertFalse($row->hasDestinationProperty('field2')); + $this->assertTrue($row->hasEmptyDestinationProperty('field1')); + $this->assertTrue($row->hasEmptyDestinationProperty('field2')); + + // Prevent removal of field 2. + $row->removeEmptyDestinationProperty('field2'); + } + + /** + * Executes a migration import for the given migration definition. + * + * @param array $definition + * The migration definition. + */ + protected function executeMigrationImport(array $definition): void { + $migration = $this->migrationManager->createStubMigration($definition); + (new MigrateExecutable($migration))->import(); + } + +} diff --git a/core/modules/migrate/tests/src/Unit/RowTest.php b/core/modules/migrate/tests/src/Unit/RowTest.php index 69fce6f78607..7db1a51db437 100644 --- a/core/modules/migrate/tests/src/Unit/RowTest.php +++ b/core/modules/migrate/tests/src/Unit/RowTest.php @@ -292,6 +292,43 @@ class RowTest extends UnitTestCase { } /** + * Tests checking for and removing destination properties that may be empty. + * + * @covers ::hasEmptyDestinationProperty + * @covers ::removeEmptyDestinationProperty + */ + public function testDestinationOrEmptyProperty(): void { + $row = new Row($this->testValues, $this->testSourceIds); + + // Set a destination. + $row->setDestinationProperty('nid', 2); + $this->assertTrue($row->hasDestinationProperty('nid')); + $this->assertFalse($row->hasEmptyDestinationProperty('nid')); + + // Set an empty destination. + $row->setEmptyDestinationProperty('a_property_with_no_value'); + $this->assertTrue($row->hasEmptyDestinationProperty('a_property_with_no_value')); + $this->assertFalse($row->hasDestinationProperty('a_property_with_no_value')); + + // Removing an empty destination that is not actually empty has no effect. + $row->removeEmptyDestinationProperty('nid'); + $this->assertTrue($row->hasDestinationProperty('nid')); + $this->assertFalse($row->hasEmptyDestinationProperty('nid')); + + // Removing a destination that is actually empty has no effect. + $row->removeDestinationProperty('a_property_with_no_value'); + $this->assertTrue($row->hasEmptyDestinationProperty('a_property_with_no_value')); + + // Remove the empty destination. + $row->removeEmptyDestinationProperty('a_property_with_no_value'); + $this->assertFalse($row->hasEmptyDestinationProperty('a_property_with_no_value')); + + // Removing a destination that does not exist does not throw an error. + $this->assertFalse($row->hasEmptyDestinationProperty('not_a_property')); + $row->removeEmptyDestinationProperty('not_a_property'); + } + + /** * Tests setting/getting multiple destination IDs. */ public function testMultipleDestination(): void { diff --git a/core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php b/core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php index f85771b52b63..db9f32cb6a63 100644 --- a/core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/FunctionalJavascript/SettingsTest.php @@ -5,14 +5,14 @@ declare(strict_types=1); namespace Drupal\Tests\migrate_drupal_ui\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore drupalmysqldriverdatabasemysql - /** * Tests migrate upgrade credential form with settings in settings.php. - * - * @group migrate_drupal_ui */ +#[Group('migrate_drupal_ui')] class SettingsTest extends WebDriverTestBase { /** @@ -55,9 +55,8 @@ class SettingsTest extends WebDriverTestBase { * * @throws \Behat\Mink\Exception\ElementNotFoundException * @throws \Behat\Mink\Exception\ExpectationException - * - * @dataProvider providerTestCredentialForm */ + #[DataProvider('providerTestCredentialForm')] public function testCredentialForm($source_connection, $version, array $manual, array $databases, $expected_source_connection): void { // Write settings. $migrate_file_public_path = '/var/www/drupal7/sites/default/files'; diff --git a/core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php b/core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php index 87d100d40aa7..90b6874c6bc4 100644 --- a/core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php +++ b/core/modules/navigation/tests/src/FunctionalJavascript/NavigationBlockUiTest.php @@ -11,12 +11,12 @@ use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait; use Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderSortTrait; use Drupal\Tests\system\Traits\OffCanvasTestTrait; use Drupal\user\UserInterface; +use PHPUnit\Framework\Attributes\Group; /** * Tests that the navigation block UI exists and stores data correctly. - * - * @group navigation */ +#[Group('navigation')] class NavigationBlockUiTest extends WebDriverTestBase { use BlockCreationTrait; diff --git a/core/modules/navigation/tests/src/FunctionalJavascript/NavigationUserBlockTest.php b/core/modules/navigation/tests/src/FunctionalJavascript/NavigationUserBlockTest.php index dbbce1ea0c7a..e619686a806a 100644 --- a/core/modules/navigation/tests/src/FunctionalJavascript/NavigationUserBlockTest.php +++ b/core/modules/navigation/tests/src/FunctionalJavascript/NavigationUserBlockTest.php @@ -7,14 +7,13 @@ namespace Drupal\Tests\navigation\FunctionalJavascript; use Behat\Mink\Element\Element; use Drupal\Core\Url; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; // cspell:ignore navigationuser linksuserwrapper - /** * Tests for \Drupal\navigation\Plugin\NavigationBlock\NavigationUserBlock. - * - * @group navigation */ +#[Group('navigation')] class NavigationUserBlockTest extends WebDriverTestBase { /** diff --git a/core/modules/navigation/tests/src/FunctionalJavascript/PerformanceTest.php b/core/modules/navigation/tests/src/FunctionalJavascript/PerformanceTest.php index 5bf9d2477f09..ad6c5712d712 100644 --- a/core/modules/navigation/tests/src/FunctionalJavascript/PerformanceTest.php +++ b/core/modules/navigation/tests/src/FunctionalJavascript/PerformanceTest.php @@ -5,6 +5,8 @@ declare(strict_types=1); namespace Drupal\Tests\navigation\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\PerformanceTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RequiresPhpExtension; /** * Tests performance with the navigation toolbar enabled. @@ -13,11 +15,10 @@ use Drupal\FunctionalJavascriptTests\PerformanceTestBase; * * @todo move this coverage to StandardPerformanceTest when Navigation is * enabled by default. - * - * @group Common - * @group #slow - * @requires extension apcu */ +#[Group('Common')] +#[Group('#slow')] +#[RequiresPhpExtension('apcu')] class PerformanceTest extends PerformanceTestBase { /** diff --git a/core/modules/node/node.module b/core/modules/node/node.module index d68a04fcbc8a..6841f24b96b1 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -333,10 +333,11 @@ function template_preprocess_node(&$variables): void { // $variables['content'] is more flexible and consistent. $submitted_configurable = $node->getFieldDefinition('created')->isDisplayConfigurable('view') || $node->getFieldDefinition('uid')->isDisplayConfigurable('view'); if (!$skip_custom_preprocessing || !$submitted_configurable) { - $variables['date'] = \Drupal::service('renderer')->render($variables['elements']['created']); - unset($variables['elements']['created']); - $variables['author_name'] = \Drupal::service('renderer')->render($variables['elements']['uid']); - unset($variables['elements']['uid']); + /** @var \Drupal\Core\Render\RendererInterface $renderer */ + $renderer = \Drupal::service('renderer'); + $variables['date'] = !empty($variables['elements']['created']) ? $renderer->render($variables['elements']['created']) : ''; + $variables['author_name'] = !empty($variables['elements']['uid']) ? $renderer->render($variables['elements']['uid']) : ''; + unset($variables['elements']['created'], $variables['elements']['uid']); } if (isset($variables['elements']['title']) && (!$skip_custom_preprocessing || !$node->getFieldDefinition('title')->isDisplayConfigurable('view'))) { diff --git a/core/modules/node/tests/src/FunctionalJavascript/CollapsedSummariesTest.php b/core/modules/node/tests/src/FunctionalJavascript/CollapsedSummariesTest.php index 84f4a376af97..6333930b8863 100644 --- a/core/modules/node/tests/src/FunctionalJavascript/CollapsedSummariesTest.php +++ b/core/modules/node/tests/src/FunctionalJavascript/CollapsedSummariesTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\node\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests that outlines of node meta values are displayed in summaries and tabs. - * - * @group node */ +#[Group('node')] class CollapsedSummariesTest extends WebDriverTestBase { /** diff --git a/core/modules/node/tests/src/FunctionalJavascript/ContextualLinksTest.php b/core/modules/node/tests/src/FunctionalJavascript/ContextualLinksTest.php index 4c499c01a862..876d96067768 100644 --- a/core/modules/node/tests/src/FunctionalJavascript/ContextualLinksTest.php +++ b/core/modules/node/tests/src/FunctionalJavascript/ContextualLinksTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\node\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\node\Entity\Node; use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait; +use PHPUnit\Framework\Attributes\Group; /** * Create a node with revisions and test contextual links. - * - * @group node */ +#[Group('node')] class ContextualLinksTest extends WebDriverTestBase { use ContextualLinkClickTrait; diff --git a/core/modules/node/tests/src/FunctionalJavascript/NodeDeleteConfirmTest.php b/core/modules/node/tests/src/FunctionalJavascript/NodeDeleteConfirmTest.php index 5eb912c577cd..22a33d0c4b80 100644 --- a/core/modules/node/tests/src/FunctionalJavascript/NodeDeleteConfirmTest.php +++ b/core/modules/node/tests/src/FunctionalJavascript/NodeDeleteConfirmTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\node\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\views\Views; +use PHPUnit\Framework\Attributes\Group; /** * Tests JavaScript functionality specific to delete operations. - * - * @group node */ +#[Group('node')] class NodeDeleteConfirmTest extends WebDriverTestBase { /** diff --git a/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php b/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php index 33a8795a6498..e1dbf426cec8 100644 --- a/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php +++ b/core/modules/node/tests/src/FunctionalJavascript/NodePreviewLinkTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\node\FunctionalJavascript; use Drupal\filter\Entity\FilterFormat; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JavaScript prevention of navigation away from node previews. - * - * @group node */ +#[Group('node')] class NodePreviewLinkTest extends WebDriverTestBase { /** diff --git a/core/modules/node/tests/src/FunctionalJavascript/SettingSummariesContentTypeTest.php b/core/modules/node/tests/src/FunctionalJavascript/SettingSummariesContentTypeTest.php index 99ba0722d006..309c14c37b37 100644 --- a/core/modules/node/tests/src/FunctionalJavascript/SettingSummariesContentTypeTest.php +++ b/core/modules/node/tests/src/FunctionalJavascript/SettingSummariesContentTypeTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\node\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JavaScript updating of summaries on content type form. - * - * @group node */ +#[Group('node')] class SettingSummariesContentTypeTest extends WebDriverTestBase { /** diff --git a/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUIAllowedValuesTest.php b/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUIAllowedValuesTest.php index 28dc50ef60f1..174cdd0760ff 100644 --- a/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUIAllowedValuesTest.php +++ b/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUIAllowedValuesTest.php @@ -8,13 +8,14 @@ use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\field_ui\Traits\FieldUiJSTestTrait; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests the Options field allowed values UI functionality. - * - * @group options - * @group #slow */ +#[Group('options')] +#[Group('#slow')] class OptionsFieldUIAllowedValuesTest extends WebDriverTestBase { use FieldUiJSTestTrait; @@ -84,9 +85,8 @@ class OptionsFieldUIAllowedValuesTest extends WebDriverTestBase { /** * Tests option types allowed values. - * - * @dataProvider providerTestOptionsAllowedValues */ + #[DataProvider('providerTestOptionsAllowedValues')] public function testOptionsAllowedValues($option_type, $options, $is_string_option, string $add_row_method): void { $assert = $this->assertSession(); $this->fieldName = 'field_options_text'; diff --git a/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php b/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php index 25dcc1d2ebc6..9d7a5c9f5474 100644 --- a/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php +++ b/core/modules/options/tests/src/FunctionalJavascript/OptionsFieldUITest.php @@ -8,13 +8,13 @@ use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\field_ui\Traits\FieldUiJSTestTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests the Options field UI functionality. - * - * @group options - * @group #slow */ +#[Group('options')] +#[Group('#slow')] class OptionsFieldUITest extends WebDriverTestBase { use FieldUiJSTestTrait; diff --git a/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php b/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php index 0e85555f5244..2cc616e8e627 100644 --- a/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php +++ b/core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\responsive_image\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\responsive_image\Entity\ResponsiveImageStyle; use Drupal\Tests\field_ui\Traits\FieldUiJSTestTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests the responsive image field UI. - * - * @group responsive_image */ +#[Group('responsive_image')] class ResponsiveImageFieldUiTest extends WebDriverTestBase { use FieldUiJSTestTrait; diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php index 023d3f3a3676..2390d415f1d3 100644 --- a/core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php +++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/ConfigAccessTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\settings_tray\FunctionalJavascript; use Drupal\menu_link_content\Entity\MenuLinkContent; use Drupal\user\Entity\Role; +use PHPUnit\Framework\Attributes\Group; /** * Tests handling of configuration overrides. - * - * @group settings_tray */ +#[Group('settings_tray')] class ConfigAccessTest extends SettingsTrayTestBase { /** diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php index 085b9d6def19..c40b17211bb5 100644 --- a/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php +++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/OverriddenConfigurationTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\settings_tray\FunctionalJavascript; use Drupal\block\Entity\Block; use Drupal\menu_link_content\Entity\MenuLinkContent; use Drupal\user\Entity\Role; +use PHPUnit\Framework\Attributes\Group; /** * Tests handling of configuration overrides. - * - * @group settings_tray */ +#[Group('settings_tray')] class OverriddenConfigurationTest extends SettingsTrayTestBase { /** diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php index 26c24424f9d1..518c8581edf8 100644 --- a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php +++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\settings_tray\FunctionalJavascript; use Drupal\settings_tray_test\Plugin\Block\SettingsTrayFormAnnotationIsClassBlock; use Drupal\settings_tray_test\Plugin\Block\SettingsTrayFormAnnotationNoneBlock; use Drupal\user\Entity\Role; +use PHPUnit\Framework\Attributes\Group; /** * Testing opening and saving block forms in the off-canvas dialog. - * - * @group settings_tray */ +#[Group('settings_tray')] class SettingsTrayBlockFormTest extends SettingsTrayTestBase { /** diff --git a/core/modules/system/src/Controller/DbUpdateController.php b/core/modules/system/src/Controller/DbUpdateController.php index 2f5ae0512040..0bd9e737f59e 100644 --- a/core/modules/system/src/Controller/DbUpdateController.php +++ b/core/modules/system/src/Controller/DbUpdateController.php @@ -705,16 +705,20 @@ class DbUpdateController extends ControllerBase { 'title' => $this->t('Front page'), 'url' => Url::fromRoute('<front>')->setOption('base_url', $base_url), ]; - if ($this->account->hasPermission('access administration pages')) { + + $admin_url = Url::fromRoute('system.admin')->setOption('base_url', $base_url); + if ($admin_url->access($this->account)) { $links['admin-pages'] = [ 'title' => $this->t('Administration pages'), - 'url' => Url::fromRoute('system.admin')->setOption('base_url', $base_url), + 'url' => $admin_url, ]; } - if ($this->account->hasPermission('administer site configuration')) { + + $status_report_url = Url::fromRoute('system.status')->setOption('base_url', $base_url); + if ($status_report_url->access($this->account)) { $links['status-report'] = [ 'title' => $this->t('Status report'), - 'url' => Url::fromRoute('system.status')->setOption('base_url', $base_url), + 'url' => $status_report_url, ]; } return $links; diff --git a/core/modules/system/tests/src/FunctionalJavascript/ActiveLinkTest.php b/core/modules/system/tests/src/FunctionalJavascript/ActiveLinkTest.php index 5d2a2848aa04..4767c4d1b98f 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/ActiveLinkTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/ActiveLinkTest.php @@ -5,14 +5,14 @@ declare(strict_types=1); namespace Drupal\Tests\system\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests active link JS behavior. * * @see Drupal.behaviors.activeLinks - * - * @group system */ +#[Group('system')] class ActiveLinkTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/Batch/ProcessingTest.php b/core/modules/system/tests/src/FunctionalJavascript/Batch/ProcessingTest.php index 03952729d54a..9fbe8a05be0c 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/Batch/ProcessingTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/Batch/ProcessingTest.php @@ -5,10 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\system\FunctionalJavascript\Batch; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** - * @group Batch + * Tests Processing. */ +#[Group('Batch')] class ProcessingTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/CopyFieldValueTest.php b/core/modules/system/tests/src/FunctionalJavascript/CopyFieldValueTest.php index 38728c384559..5ed27a9c42a3 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/CopyFieldValueTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/CopyFieldValueTest.php @@ -5,14 +5,14 @@ declare(strict_types=1); namespace Drupal\Tests\system\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests copy field value functionality. * * @see Drupal.behaviors.copyFieldValue. - * - * @group system */ +#[Group('system')] class CopyFieldValueTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/Form/ConfigTargetTest.php b/core/modules/system/tests/src/FunctionalJavascript/Form/ConfigTargetTest.php index e9e092f23ee1..5bb3f54f7d5c 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/Form/ConfigTargetTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/Form/ConfigTargetTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\system\FunctionalJavascript\Form; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests forms using #config_target and #ajax together. - * - * @group Form */ +#[Group('Form')] class ConfigTargetTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/Form/DevelopmentSettingsFormTest.php b/core/modules/system/tests/src/FunctionalJavascript/Form/DevelopmentSettingsFormTest.php index 30f50b7bd0af..f2feffa7fa84 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/Form/DevelopmentSettingsFormTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/Form/DevelopmentSettingsFormTest.php @@ -7,13 +7,14 @@ namespace Drupal\Tests\system\FunctionalJavascript\Form; use Drupal\Core\Cache\NullBackend; use Drupal\Core\Url; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; use Symfony\Component\HttpFoundation\Request; /** * Tests development settings form items for expected behavior. - * - * @group Form */ +#[Group('Form')] class DevelopmentSettingsFormTest extends WebDriverTestBase { /** @@ -40,9 +41,8 @@ class DevelopmentSettingsFormTest extends WebDriverTestBase { /** * Tests turning on Twig development mode. - * - * @dataProvider twigDevelopmentData */ + #[DataProvider('twigDevelopmentData')] public function testTwigDevelopmentMode(bool $twig_development_mode, ?bool $twig_debug, ?bool $twig_cache_disable): void { $twig_debug = $twig_debug ?? $twig_development_mode; $twig_cache_disable = $twig_cache_disable ?? $twig_development_mode; diff --git a/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsTableSelectTest.php b/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsTableSelectTest.php index 379856a5a1b0..a41129b9cff1 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsTableSelectTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsTableSelectTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\system\FunctionalJavascript\Form; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the tableselect form element for expected behavior. - * - * @group Form */ +#[Group('Form')] class ElementsTableSelectTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsVerticalTabsWithSummaryTest.php b/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsVerticalTabsWithSummaryTest.php index 376a9f96170c..9fbe3c279959 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsVerticalTabsWithSummaryTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsVerticalTabsWithSummaryTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\system\FunctionalJavascript\Form; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests that titles and summaries in vertical-tabs form elements are set correctly. - * - * @group Form */ +#[Group('Form')] class ElementsVerticalTabsWithSummaryTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/Form/RebuildTest.php b/core/modules/system/tests/src/FunctionalJavascript/Form/RebuildTest.php index 3858006154cf..1ae041121d0e 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/Form/RebuildTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/Form/RebuildTest.php @@ -9,13 +9,14 @@ use Drupal\Core\Url; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests functionality of \Drupal\Core\Form\FormBuilderInterface::rebuildForm(). * - * @group Form * @todo Add tests for other aspects of form rebuilding. */ +#[Group('Form')] class RebuildTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/Form/TriggeringElementTest.php b/core/modules/system/tests/src/FunctionalJavascript/Form/TriggeringElementTest.php index d07aea57549d..dec0ace7075e 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/Form/TriggeringElementTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/Form/TriggeringElementTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\system\FunctionalJavascript\Form; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests that FAPI correctly determines the triggering element. - * - * @group Form */ +#[Group('Form')] class TriggeringElementTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php b/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php index 0fd5f468fb18..780b772932f7 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\system\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the off-canvas dialog functionality. - * - * @group system */ +#[Group('system')] class FrameworkTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php b/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php index ab5735efc57e..5d6e8a469ba2 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/ModalRendererTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\system\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests that dialog links use different renderer services. - * - * @group system */ +#[Group('system')] class ModalRendererTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/ModuleFilterTest.php b/core/modules/system/tests/src/FunctionalJavascript/ModuleFilterTest.php index 96f877179e3f..cb8095028308 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/ModuleFilterTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/ModuleFilterTest.php @@ -5,13 +5,13 @@ declare(strict_types=1); namespace Drupal\Tests\system\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JavaScript functionality of the module filter. - * - * @group system - * @group #slow */ +#[Group('system')] +#[Group('#slow')] class ModuleFilterTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/ModuleUninstallFilterTest.php b/core/modules/system/tests/src/FunctionalJavascript/ModuleUninstallFilterTest.php index 2652b3225783..d8b3bf0eac15 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/ModuleUninstallFilterTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/ModuleUninstallFilterTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\system\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JavaScript functionality of the module uninstall filter. - * - * @group system */ +#[Group('system')] class ModuleUninstallFilterTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php index aef99eb39018..9839fc3edd49 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTest.php @@ -4,11 +4,13 @@ declare(strict_types=1); namespace Drupal\Tests\system\FunctionalJavascript; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; + /** * Tests the off-canvas dialog functionality. - * - * @group system */ +#[Group('system')] class OffCanvasTest extends OffCanvasTestBase { /** @@ -34,9 +36,8 @@ class OffCanvasTest extends OffCanvasTestBase { /** * Tests that non-contextual links will work with the off-canvas dialog. - * - * @dataProvider themeDataProvider */ + #[DataProvider('themeDataProvider')] public function testOffCanvasLinks($theme): void { $this->enableTheme($theme); $this->drupalGet('/off-canvas-test-links'); diff --git a/core/modules/system/tests/src/FunctionalJavascript/System/DateFormatTest.php b/core/modules/system/tests/src/FunctionalJavascript/System/DateFormatTest.php index d2ab2f4a744b..1bbb86d92e6c 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/System/DateFormatTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/System/DateFormatTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\system\FunctionalJavascript\System; use Drupal\Core\Datetime\Entity\DateFormat; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests that date formats UI with JavaScript enabled. - * - * @group system */ +#[Group('system')] class DateFormatTest extends WebDriverTestBase { /** diff --git a/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php b/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php index 41fc94d4f1e1..9c94c6040b06 100644 --- a/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php +++ b/core/modules/system/tests/src/FunctionalJavascript/ThemeSettingsFormTest.php @@ -7,12 +7,13 @@ namespace Drupal\Tests\system\FunctionalJavascript; use Drupal\file\Entity\File; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\TestFileCreationTrait; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests that theme form settings works correctly. - * - * @group system */ +#[Group('system')] class ThemeSettingsFormTest extends WebDriverTestBase { use TestFileCreationTrait; @@ -39,9 +40,8 @@ class ThemeSettingsFormTest extends WebDriverTestBase { /** * Tests that submission handler works correctly. - * - * @dataProvider providerTestFormSettingsSubmissionHandler */ + #[DataProvider('providerTestFormSettingsSubmissionHandler')] public function testFormSettingsSubmissionHandler($theme): void { \Drupal::service('theme_installer')->install([$theme]); diff --git a/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php b/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php index 957b7ae5e9d1..92576dcb95b2 100644 --- a/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php +++ b/core/modules/text/tests/src/FunctionalJavascript/TextareaWithSummaryTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\text\FunctionalJavascript; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JavaScript functionality of the text_textarea_with_summary widget. - * - * @group text */ +#[Group('text')] class TextareaWithSummaryTest extends WebDriverTestBase { /** diff --git a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarActiveTrailTest.php b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarActiveTrailTest.php index b12ce9ef54f5..73f495ae850c 100644 --- a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarActiveTrailTest.php +++ b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarActiveTrailTest.php @@ -5,12 +5,13 @@ declare(strict_types=1); namespace Drupal\Tests\toolbar\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\TestWith; /** * Tests that the active trail is maintained in the toolbar. - * - * @group toolbar */ +#[Group('toolbar')] class ToolbarActiveTrailTest extends WebDriverTestBase { /** @@ -43,11 +44,10 @@ class ToolbarActiveTrailTest extends WebDriverTestBase { * @param string $orientation * The toolbar orientation. * - * @testWith ["vertical"] - * ["horizontal"] - * * @throws \Behat\Mink\Exception\ElementNotFoundException */ + #[TestWith(["vertical"])] + #[TestWith(["horizontal"])] public function testToolbarActiveTrail(string $orientation): void { $page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); diff --git a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php index dcf0ff6d79c3..639129786b31 100644 --- a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php +++ b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\toolbar\FunctionalJavascript; use Behat\Mink\Element\NodeElement; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JavaScript functionality of the toolbar. - * - * @group toolbar */ +#[Group('toolbar')] class ToolbarIntegrationTest extends WebDriverTestBase { /** diff --git a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarStoredStateTest.php b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarStoredStateTest.php index 432dd8c85227..9fc82f8f007c 100644 --- a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarStoredStateTest.php +++ b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarStoredStateTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\toolbar\FunctionalJavascript; use Drupal\Component\Serialization\Json; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the sessionStorage state set by the toolbar. - * - * @group toolbar */ +#[Group('toolbar')] class ToolbarStoredStateTest extends WebDriverTestBase { /** diff --git a/core/modules/user/tests/src/FunctionalJavascript/PasswordConfirmWidgetTest.php b/core/modules/user/tests/src/FunctionalJavascript/PasswordConfirmWidgetTest.php index 7f63bec926e9..c7441b551266 100644 --- a/core/modules/user/tests/src/FunctionalJavascript/PasswordConfirmWidgetTest.php +++ b/core/modules/user/tests/src/FunctionalJavascript/PasswordConfirmWidgetTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\user\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JS components added to the PasswordConfirm render element. - * - * @group user */ +#[Group('user')] class PasswordConfirmWidgetTest extends WebDriverTestBase { /** diff --git a/core/modules/user/tests/src/FunctionalJavascript/PermissionFilterTest.php b/core/modules/user/tests/src/FunctionalJavascript/PermissionFilterTest.php index f961061c2c4a..2a56dcb2d7c3 100644 --- a/core/modules/user/tests/src/FunctionalJavascript/PermissionFilterTest.php +++ b/core/modules/user/tests/src/FunctionalJavascript/PermissionFilterTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\user\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JavaScript functionality of the permission filter. - * - * @group user */ +#[Group('user')] class PermissionFilterTest extends WebDriverTestBase { /** diff --git a/core/modules/user/tests/src/FunctionalJavascript/RegistrationWithUserFieldsTest.php b/core/modules/user/tests/src/FunctionalJavascript/RegistrationWithUserFieldsTest.php index 7361ea0698cb..120bf2e44f1c 100644 --- a/core/modules/user/tests/src/FunctionalJavascript/RegistrationWithUserFieldsTest.php +++ b/core/modules/user/tests/src/FunctionalJavascript/RegistrationWithUserFieldsTest.php @@ -4,16 +4,16 @@ declare(strict_types=1); namespace Drupal\Tests\user\FunctionalJavascript; -use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; +use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests user registration forms with additional fields. - * - * @group user */ +#[Group('user')] class RegistrationWithUserFieldsTest extends WebDriverTestBase { /** diff --git a/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php b/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php index ab815c20cdb2..a8fc7da8b472 100644 --- a/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php +++ b/core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php @@ -10,12 +10,12 @@ use Drupal\Core\Url; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\TestFileCreationTrait; use Drupal\user\Entity\User; +use PHPUnit\Framework\Attributes\Group; /** * Ensure that password reset methods work as expected. - * - * @group user */ +#[Group('user')] class UserPasswordResetTest extends WebDriverTestBase { use AssertMailTrait { diff --git a/core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php b/core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php index d467a2fbabfa..6c2e80c438bc 100644 --- a/core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php +++ b/core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\user\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\user\RoleInterface; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JS components added to the user permissions page. - * - * @group user */ +#[Group('user')] class UserPermissionsTest extends WebDriverTestBase { /** diff --git a/core/modules/user/tests/src/FunctionalJavascript/UserRegisterFormTest.php b/core/modules/user/tests/src/FunctionalJavascript/UserRegisterFormTest.php index 6e0d600aa3b8..e35ee0b19b1c 100644 --- a/core/modules/user/tests/src/FunctionalJavascript/UserRegisterFormTest.php +++ b/core/modules/user/tests/src/FunctionalJavascript/UserRegisterFormTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\user\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests user registration forms via JS. - * - * @group user */ +#[Group('user')] class UserRegisterFormTest extends WebDriverTestBase { /** diff --git a/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php index 76b782fdf199..b645ceaef11f 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/BlockExposedFilterAJAXTest.php @@ -8,12 +8,12 @@ use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; use Drupal\Tests\node\Traits\NodeCreationTrait; use Drupal\views\Tests\ViewTestData; +use PHPUnit\Framework\Attributes\Group; /** * Tests the exposed filter ajax functionality in a block. - * - * @group views */ +#[Group('views')] class BlockExposedFilterAJAXTest extends WebDriverTestBase { use ContentTypeCreationTrait; diff --git a/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php index 858c5ee2365f..cbdbb5a242b1 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/ClickSortingAJAXTest.php @@ -8,12 +8,12 @@ use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; use Drupal\Tests\node\Traits\NodeCreationTrait; use Drupal\views\Tests\ViewTestData; +use PHPUnit\Framework\Attributes\Group; /** * Tests the click sorting AJAX functionality of Views exposed forms. - * - * @group views */ +#[Group('views')] class ClickSortingAJAXTest extends WebDriverTestBase { use ContentTypeCreationTrait; diff --git a/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php index af7cad9e287d..1ddbcdba9fce 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/ExposedFilterAJAXTest.php @@ -8,12 +8,12 @@ use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; use Drupal\Tests\node\Traits\NodeCreationTrait; use Drupal\views\Tests\ViewTestData; +use PHPUnit\Framework\Attributes\Group; /** * Tests the basic AJAX functionality of Views exposed forms. - * - * @group views */ +#[Group('views')] class ExposedFilterAJAXTest extends WebDriverTestBase { use ContentTypeCreationTrait; diff --git a/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php b/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php index 390046be4124..f80bcc956197 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/GlossaryViewTest.php @@ -10,12 +10,12 @@ use Drupal\language\Entity\ConfigurableLanguage; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; use Drupal\Tests\node\Traits\NodeCreationTrait; use Drupal\views\Tests\ViewTestData; +use PHPUnit\Framework\Attributes\Group; /** * Tests the basic AJAX functionality of the Glossary View. - * - * @group node */ +#[Group('node')] class GlossaryViewTest extends WebDriverTestBase { use ContentTypeCreationTrait; diff --git a/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php b/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php index feba85b61726..f6da5d52dbe6 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/PaginationAJAXTest.php @@ -8,12 +8,12 @@ use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; use Drupal\Tests\node\Traits\NodeCreationTrait; use Drupal\views\Tests\ViewTestData; +use PHPUnit\Framework\Attributes\Group; /** * Tests the click sorting AJAX functionality of Views exposed forms. - * - * @group views */ +#[Group('views')] class PaginationAJAXTest extends WebDriverTestBase { use ContentTypeCreationTrait; diff --git a/core/modules/views/tests/src/FunctionalJavascript/Plugin/BulkOperationsTest.php b/core/modules/views/tests/src/FunctionalJavascript/Plugin/BulkOperationsTest.php index fb6bcab6de73..46885027d7d4 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/Plugin/BulkOperationsTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/Plugin/BulkOperationsTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\views\FunctionalJavascript\Plugin; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the bulk operations. - * - * @group views */ +#[Group('views')] class BulkOperationsTest extends WebDriverTestBase { /** diff --git a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/ContextualFilterTest.php b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/ContextualFilterTest.php index 1987e5854313..91baf9200746 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/ContextualFilterTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/ContextualFilterTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\views\FunctionalJavascript\Plugin\views\Handler; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\views\Tests\ViewTestData; +use PHPUnit\Framework\Attributes\Group; /** * Tests the contextual filter handler UI. - * - * @group views */ +#[Group('views')] class ContextualFilterTest extends WebDriverTestBase { /** diff --git a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FieldTest.php b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FieldTest.php index 1224c5785940..6808086cac0f 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FieldTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FieldTest.php @@ -10,12 +10,12 @@ use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; use Drupal\Tests\SchemaCheckTestTrait; use Drupal\views\Tests\ViewTestData; +use PHPUnit\Framework\Attributes\Group; /** * Tests the field handler UI. - * - * @group views */ +#[Group('views')] class FieldTest extends WebDriverTestBase { use SchemaCheckTestTrait; diff --git a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FilterTest.php b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FilterTest.php index 6ecbeeff7883..ce5c8eb52db1 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FilterTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FilterTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\views\FunctionalJavascript\Plugin\views\Handler; use Drupal\field\Entity\FieldConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\node\Entity\NodeType; +use PHPUnit\Framework\Attributes\Group; /** * Tests the add filter handler UI. - * - * @group views */ +#[Group('views')] class FilterTest extends WebDriverTestBase { /** diff --git a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php index 458d90531678..f1ae1c5a23e3 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php @@ -8,12 +8,12 @@ use Drupal\field\Entity\FieldConfig; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\node\Entity\NodeType; use Drupal\views\Tests\ViewTestData; +use PHPUnit\Framework\Attributes\Group; /** * Tests the grouped exposed filter admin UI. - * - * @group views */ +#[Group('views')] class GroupedExposedFilterTest extends WebDriverTestBase { /** diff --git a/core/modules/views/tests/src/FunctionalJavascript/RedirectAjaxTest.php b/core/modules/views/tests/src/FunctionalJavascript/RedirectAjaxTest.php index 2cee37e5c956..8cfd23b2b8e6 100644 --- a/core/modules/views/tests/src/FunctionalJavascript/RedirectAjaxTest.php +++ b/core/modules/views/tests/src/FunctionalJavascript/RedirectAjaxTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\views\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\node\Traits\ContentTypeCreationTrait; use Drupal\Tests\node\Traits\NodeCreationTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests that the redirects work with Ajax enabled views. - * - * @group views */ +#[Group('views')] class RedirectAjaxTest extends WebDriverTestBase { use ContentTypeCreationTrait; diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/AdminAjaxTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/AdminAjaxTest.php index 7b6f8495264d..de762b018b1f 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/AdminAjaxTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/AdminAjaxTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\views_ui\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the admin UI AJAX interactions. - * - * @group views_ui */ +#[Group('views_ui')] class AdminAjaxTest extends WebDriverTestBase { /** diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php index 03ad843b1ad4..24e12e2c4607 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/DisplayTest.php @@ -7,17 +7,16 @@ namespace Drupal\Tests\views_ui\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\locale\SourceString; +use Drupal\Tests\node\Traits\NodeCreationTrait; use Drupal\views\Entity\View; use Drupal\views\Tests\ViewTestData; -use Drupal\Tests\node\Traits\NodeCreationTrait; +use PHPUnit\Framework\Attributes\Group; // cSpell:ignore Blokk hozzáadása - /** * Tests the display UI. - * - * @group views_ui */ +#[Group('views_ui')] class DisplayTest extends WebDriverTestBase { use NodeCreationTrait; diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FieldDialogsTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FieldDialogsTest.php index 7864b7286f73..6e5e13712e07 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/FieldDialogsTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FieldDialogsTest.php @@ -6,12 +6,12 @@ namespace Drupal\Tests\views_ui\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\views\Tests\ViewTestData; +use PHPUnit\Framework\Attributes\Group; /** * Tests the fields dialogs. - * - * @group views_ui */ +#[Group('views_ui')] class FieldDialogsTest extends WebDriverTestBase { /** diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php index f2580e7457e1..a336d3cf7804 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\views_ui\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the View UI filter criteria group dialog. - * - * @group views_ui */ +#[Group('views_ui')] class FilterCriteriaTest extends WebDriverTestBase { /** diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterEntityReferenceTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterEntityReferenceTest.php index b6021c6580e3..eca6f479ed59 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterEntityReferenceTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterEntityReferenceTest.php @@ -7,13 +7,14 @@ namespace Drupal\Tests\views_ui\FunctionalJavascript; use Drupal\Core\Url; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\Tests\views_ui\Traits\FilterEntityReferenceTrait; +use PHPUnit\Framework\Attributes\Group; /** * Tests views creation wizard. * - * @group views_ui * @see \Drupal\views\Plugin\views\filter\EntityReference */ +#[Group('views_ui')] class FilterEntityReferenceTest extends WebDriverTestBase { use FilterEntityReferenceTrait; diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php index 3a5dc1100403..fbfd5141ffed 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterOptionsTest.php @@ -5,12 +5,12 @@ declare(strict_types=1); namespace Drupal\Tests\views_ui\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JavaScript filtering of options in add handler form. - * - * @group views_ui */ +#[Group('views_ui')] class FilterOptionsTest extends WebDriverTestBase { /** diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php index c1b53b9765ee..d8ab9632e171 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php @@ -8,12 +8,12 @@ use Behat\Mink\Element\NodeElement; use Drupal\Core\Database\Database; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; use Drupal\views\Tests\ViewTestData; +use PHPUnit\Framework\Attributes\Group; /** * Tests the UI preview functionality. - * - * @group views_ui */ +#[Group('views_ui')] class PreviewTest extends WebDriverTestBase { /** diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php index b6f442e62653..d0d6d4725e8b 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsListingTest.php @@ -5,13 +5,14 @@ declare(strict_types=1); namespace Drupal\Tests\views_ui\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests the JavaScript filtering on the Views listing page. * * @see core/modules/views_ui/js/views_ui.listing.js - * @group views_ui */ +#[Group('views_ui')] class ViewsListingTest extends WebDriverTestBase { /** diff --git a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php index b1026d785841..5526fb7bff39 100644 --- a/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php @@ -5,13 +5,14 @@ declare(strict_types=1); namespace Drupal\Tests\views_ui\FunctionalJavascript; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; +use PHPUnit\Framework\Attributes\Group; /** * Tests views creation wizard. * * @see core/modules/views_ui/js/views-admin.js - * @group views_ui */ +#[Group('views_ui')] class ViewsWizardTest extends WebDriverTestBase { /** diff --git a/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesLayoutBuilderIntegrationTest.php b/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesLayoutBuilderIntegrationTest.php index f59aba78bb5f..632ec73f1227 100644 --- a/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesLayoutBuilderIntegrationTest.php +++ b/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesLayoutBuilderIntegrationTest.php @@ -9,14 +9,14 @@ use Drupal\Tests\system\Traits\OffCanvasTestTrait; use Drupal\Tests\workspaces\Functional\WorkspaceTestUtilities; use Drupal\user\UserInterface; use Drupal\workspaces\Entity\Workspace; +use PHPUnit\Framework\Attributes\Group; /** * Tests for layout editing in workspaces. - * - * @group layout_builder - * @group workspaces - * @group #slow */ +#[Group('layout_builder')] +#[Group('workspaces')] +#[Group('#slow')] class WorkspacesLayoutBuilderIntegrationTest extends InlineBlockTestBase { use OffCanvasTestTrait; @@ -191,7 +191,7 @@ class WorkspacesLayoutBuilderIntegrationTest extends InlineBlockTestBase { /** * Tests workspace specific layout tempstore data. * - * @covers \Drupal\workspaces\WorkspacesLayoutTempstoreRepository::getKey + * @legacy-covers \Drupal\workspaces\WorkspacesLayoutTempstoreRepository::getKey */ public function testWorkspacesLayoutTempstore(): void { $assert_session = $this->assertSession(); diff --git a/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesMediaLibraryIntegrationTest.php b/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesMediaLibraryIntegrationTest.php index 49cac2860ae7..673aed12a737 100644 --- a/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesMediaLibraryIntegrationTest.php +++ b/core/modules/workspaces/tests/src/FunctionalJavascript/WorkspacesMediaLibraryIntegrationTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\workspaces\FunctionalJavascript; use Drupal\Tests\media_library\FunctionalJavascript\EntityReferenceWidgetTest; use Drupal\user\UserInterface; use Drupal\workspaces\Entity\Workspace; +use PHPUnit\Framework\Attributes\Group; /** * Tests the Media library entity reference widget in a workspace. - * - * @group workspaces */ +#[Group('workspaces')] class WorkspacesMediaLibraryIntegrationTest extends EntityReferenceWidgetTest { /** diff --git a/core/modules/workspaces_ui/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php b/core/modules/workspaces_ui/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php index b83953de37e4..5d500fce8fa2 100644 --- a/core/modules/workspaces_ui/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php +++ b/core/modules/workspaces_ui/tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php @@ -6,13 +6,13 @@ namespace Drupal\Tests\workspaces_ui\FunctionalJavascript; use Drupal\Tests\system\FunctionalJavascript\OffCanvasTestBase; use Drupal\workspaces\Entity\Workspace; +use PHPUnit\Framework\Attributes\Group; /** * Tests workspace settings stray integration. - * - * @group workspaces - * @group workspaces_ui */ +#[Group('workspaces')] +#[Group('workspaces_ui')] class WorkspaceToolbarIntegrationTest extends OffCanvasTestBase { /** diff --git a/core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationTest.php b/core/tests/Drupal/FunctionalTests/Asset/AssetOptimizationTest.php index 96980a2c6059..580e7ad1a13a 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 5951ac945313..214ecd800532 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 a2f84544ff59..00e052467004 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 aac21dcff875..248c70e2965f 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 b38a93c25652..6bf8bad3ec46 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 cf48655458bc..6e8720a8d40b 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 963661a0cc8e..e379f4252ef3 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 d42b356c641e..7f191e478fe7 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 d441c23d3079..4394363c159f 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 882658558f73..d2e1684d9990 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 f279b988c6f3..2ba1abff2d2c 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 04e771f8a654..630b62e1e9e1 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 68a793f8771f..b16514006893 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 387250f43e37..01ca54848678 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 cf4eab8d67ec..aec48cfacfbd 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 57b4191a7fd0..bf3319c93bc5 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 09ce9544c309..564b3a9bbd40 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 f280ad493a57..3a876401d423 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 62f25442865f..b5bfb865c680 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 7108b212bf11..9d40cbe111c8 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 f65f4d2ddb36..b51d4042a96a 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 85a2fbcd3fef..88c3f9ed3143 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 d6bdff7c090d..514944014791 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 e5901e52fa41..a2e750974ae6 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 8ca59b6100e4..61b08c8f439e 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 e59fe25e25e3..6843860b1b8f 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 a5b9e9667666..67b99d3072a4 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 2625feb5ec38..7146a489a3d1 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 e39c1f36f608..bc219184c8b1 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 77c9b0f00b73..3ca22f197604 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 fd7bfeecd38c..e18073c31507 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 267b59260e0d..ea9cef18f9ba 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 f65c4951c0d2..2fcaeb8471c7 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 3966ebfe387b..5e432156fe97 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 20145dc37116..c6a5ecca25a1 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 bae54ab1afcd..f8c9662286ee 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 317fd82cfa9a..63fda6236ef7 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 491ffcc68660..e0fc902f851d 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 79b9209e848b..e15c9bb1bb42 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 76868fb17f8a..566d701347ba 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 67bdc2bb70a1..204a27acab1a 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 75db313b14b8..35e7a824eb62 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 22165f456c4f..380f73d70f8f 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 8b2b3e727b83..421f99625746 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 57720e6b20b2..88bcf1fb50d2 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 696a5f7a9d07..c748723bce1f 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 b766e8e6c8e2..d1841b4d26ac 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 11803c1b83cf..57ce16508659 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 fc01c2eb9a90..8b306a0a1962 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 f97483dd610d..94779d138d04 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 2ccd47a0274d..7522d6fa1c7c 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 879039b291c7..3b6e8d0c6866 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 89f7b4915478..49e2e635bb35 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 a5553bd1fb44..2d8c1d26ce74 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 8125da5bca05..4d2a5db34503 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 4461c06b2106..b8a5db5d14ab 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 ea4f70e3a6c6..ba1bcc4edd32 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 4022db2fcefa..8bbc87e27919 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 692a9af87302..800492459e0d 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 4d1bf0674250..a158388b22de 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 dc0cfc5c3655..84bcce25c138 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 7f9a0ecf60d4..5fd1e3d8ca9f 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 487fa70ac1d3..1acfdccf2b4d 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 8717249fb67e..3657826d1a04 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 a932da76d33b..c4eeca55ecae 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 3c0758957348..7249b6dace61 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 3958b82396aa..5be72fe0a9ee 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 4e401add43a4..4ef3cc94ffd7 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 0d12f466fdae..21b47fd32bc2 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 994ac39d2707..dcb80c6cb5fc 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 5bf54301e2c7..aab5e4a749a9 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 697bf2773ac0..994303dc1c83 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 f527f52ece05..80d8abf2d5bd 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 f2d498d8d4e9..e11a5deea6e9 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 e0c70d436fc4..4485729e6ef5 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 7da75723dd41..f6b48610a41e 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 ef2d40633700..905492e39875 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 4f2dc621a2c5..748dac5d5e15 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 116028ecd4c0..fb89144d7753 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 23633165b5cd..35f480db1b15 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 052ae5e01f0f..1eeb31130737 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 3d83bf8b4cac..1f39175707e1 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 89039734192f..1f5e80e05ddb 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 b7cf373a3325..37db8c5e829d 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 f8be98693f58..6a0d0c2f50f5 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 97976121601d..76b237f192a2 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 df41e7bf510e..0060152639ad 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 3513ff168deb..862d4fcffd31 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 60dc1ffdae07..1b8f5f987755 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 6a6e556944b7..8b81d3f8a7cf 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 35761c780696..9542b3a54183 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 fa513876d490..bc3d4bbe791d 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 404fd7c8ac2f..9f802b6235f9 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 20714d76e9c5..4edee593381a 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 527a4326d262..b63c5d41893b 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 573f1d8c93bf..28d79c572dd2 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 e58cac9ad7ec..9daa074367a8 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 3b1c44a70a43..cd67a8b18d89 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 c128587612f4..94909bed298a 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 bea51a836453..aac0a675a56e 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 2a7e446e3486..8269f607e921 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 76a2cf447184..a5c144ecf1d8 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 4efe36b43f2b..f863ae1bba92 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 a73e780d8352..5d5f57ce0703 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 44c6a021b143..7456bfad8281 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 f651db1657d7..e40d7088c956 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 acdede9bfa48..eedb7ee8d2ed 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 68ba252688f6..bbad8779e7c1 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 ecdc84cfd193..62962d4761d4 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 4067f678cc3b..422ec9f644e2 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 d0e1c012ca2d..6681bb1d3f45 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 7eee1133be86..ccd0ceeaad34 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 30eb2af68e5c..5780d879d937 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 3b5cc13f9d10..971aff5ad1c3 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 432c097d00df..5ee82893c8a8 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 3ec1cb8f33a8..15c4fbbbb1e0 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 695905aeae46..d466df9f7d89 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 2941b421968e..62f4618eb96d 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 915bb21fb2dd..d697e579fa33 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 9f97c320d78c..49883366571b 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 bbdff3344046..2a0a06c68ef9 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 da6f959e6916..e67266ed505b 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 bd1ccb0809ed..ebf94121b63a 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 10d773ee3a16..073fafca7dc2 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 84e96a2d7835..0378795ddcd2 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 ab1be70ceb80..34a40b672640 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 8c0f05b4d59c..50d1eddeddbe 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 ef4704da0b2a..565b02fac5fb 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 d4f0cfe61c6e..298e9f863647 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 09697cbe9f21..36b3d0c19f1e 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 c1ef24fe5a39..d2ee3036c9dd 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 7cd8de33e103..16eec966d9a8 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 8d41d2e7b19a..b61d44823050 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 fe7c0fda9c7f..e260cea160a5 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 5a45858f4b0d..6bfd9376075f 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 53b287186de5..de37e554fd66 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 bbd6438dbccf..1d38cbf8fa93 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 447224e931fe..9f591c706976 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 734058c0c4ed..c8c91d9fd91e 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 e344c7d41909..220722dab39e 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 0ac2339a8100..3b398a2dfd65 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 9e4d9485d8a3..8344dd31be4b 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 513c22142d5c..a88785f39640 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 3e099fa46fc8..67655e54eee9 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 8bb18f2c0592..3873fd2d3d1c 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 64c197721405..945cf12430bb 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 99e4974e3fc0..fca57abec9d6 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 b38938f3138e..973feb8d05bd 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 dc03f86a9630..c37c694b06fc 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 b8c5dbde1eea..f02ecdfba473 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 b31d62cc3d03..ba2cc5ee18fa 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 151a08272467..a5cac6dc418b 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/themes/olivero/css/components/button.css b/core/themes/olivero/css/components/button.css index 57204dbbc083..5dec4107ccde 100644 --- a/core/themes/olivero/css/components/button.css +++ b/core/themes/olivero/css/components/button.css @@ -11,12 +11,13 @@ */ .button { - display: inline-block; + display: inline-flex; + align-items: center; height: var(--sp3); margin-block: var(--sp1); margin-inline-start: 0; margin-inline-end: var(--sp1); - padding-block: calc((var(--sp3) - var(--line-height-s)) / 2); + padding-block: 1px 0; padding-inline: var(--sp1-5); cursor: pointer; text-align: center; @@ -29,6 +30,7 @@ font-family: var(--font-sans); font-size: var(--font-size-l); font-weight: 700; + line-height: var(--line-height-s); appearance: none; -webkit-font-smoothing: antialiased; } @@ -60,23 +62,6 @@ border-color: var(--color--gray-90); } -/* - IE11 doesn't work properly on button elements so we only do - inline-flex on modern browsers. - */ - -@supports (display: inline-flex) { - .button { - display: inline-flex; - align-items: center; - - /* Top padding accounts for font not being vertically centered within line-height. */ - padding-block: 1px 0; - padding-inline: var(--sp1-5); - line-height: var(--line-height-s); - } -} - /* No margin if is part of a menu. */ .menu .button { diff --git a/core/themes/olivero/css/components/button.pcss.css b/core/themes/olivero/css/components/button.pcss.css index ba543ec4acbb..cc4318db4ca2 100644 --- a/core/themes/olivero/css/components/button.pcss.css +++ b/core/themes/olivero/css/components/button.pcss.css @@ -6,12 +6,13 @@ @import "../base/media-queries.pcss.css"; .button { - display: inline-block; + display: inline-flex; + align-items: center; height: var(--sp3); margin-block: var(--sp1); margin-inline-start: 0; margin-inline-end: var(--sp1); - padding-block: calc((var(--sp3) - var(--line-height-s)) / 2); + padding-block: 1px 0; padding-inline: var(--sp1-5); cursor: pointer; text-align: center; @@ -23,6 +24,7 @@ font-family: var(--font-sans); font-size: var(--font-size-l); font-weight: 700; + line-height: var(--line-height-s); appearance: none; -webkit-font-smoothing: antialiased; @@ -51,20 +53,6 @@ color: var(--color--gray-90); border-color: var(--color--gray-90); } - - /* - IE11 doesn't work properly on button elements so we only do - inline-flex on modern browsers. - */ - @supports (display: inline-flex) { - display: inline-flex; - align-items: center; - - /* Top padding accounts for font not being vertically centered within line-height. */ - padding-block: 1px 0; - padding-inline: var(--sp1-5); - line-height: var(--line-height-s); - } } /* No margin if is part of a menu. */ diff --git a/core/themes/olivero/css/components/header-search-narrow.css b/core/themes/olivero/css/components/header-search-narrow.css index d69e3115dc2a..e59e190f4685 100644 --- a/core/themes/olivero/css/components/header-search-narrow.css +++ b/core/themes/olivero/css/components/header-search-narrow.css @@ -39,7 +39,7 @@ color: var(--color--white); border: solid 1px transparent; background-color: transparent; - background-image: linear-gradient(var(--color--primary-50), var(--color--primary-50)); /* Two values are needed for IE11 support. */ + background-image: linear-gradient(var(--color--primary-50)); background-repeat: no-repeat; background-position: bottom left; /* LTR */ background-size: 0% 0.3125rem; @@ -131,39 +131,12 @@ transform: scaleX(1); } -@media screen and (-ms-high-contrast: active) { - .block-search-narrow .search-form__submit:focus { - border-bottom-width: var(--sp0-5); - } - - .block-search-narrow .search-form__submit:focus span::after { - content: none; - } -} - @media (min-width: 43.75rem) { .block-search-narrow .search-form__submit { width: 5rem; } } -@media screen and (-ms-high-contrast: active) { - /* IE11's high contrast show will not show the background image, so we show the text. */ - .block-search-narrow .search-form__submit .visually-hidden { - position: static; - overflow: visible; - clip: auto; - width: auto; - height: auto; - text-align: center; - } - - /* Edge's high contrast does show the background image, so we hide it. */ - .block-search-narrow .search-form__submit .icon--search { - display: none; - } -} - /* 500px is the width of the primary nav at mobile. */ @media (min-width: 31.25rem) { diff --git a/core/themes/olivero/css/components/header-search-narrow.pcss.css b/core/themes/olivero/css/components/header-search-narrow.pcss.css index 5e2ad80e34ea..f24a3ca97a8b 100644 --- a/core/themes/olivero/css/components/header-search-narrow.pcss.css +++ b/core/themes/olivero/css/components/header-search-narrow.pcss.css @@ -33,7 +33,7 @@ color: var(--color--white); border: solid 1px transparent; background-color: transparent; - background-image: linear-gradient(var(--color--primary-50), var(--color--primary-50)); /* Two values are needed for IE11 support. */ + background-image: linear-gradient(var(--color--primary-50)); background-repeat: no-repeat; background-position: bottom left; /* LTR */ background-size: 0% 5px; @@ -117,36 +117,11 @@ & span::after { transform: scaleX(1); } - - @media screen and (-ms-high-contrast: active) { - border-bottom-width: var(--sp0-5); - - & span::after { - content: none; - } - } } @media (--md) { width: 80px; } - - @media screen and (-ms-high-contrast: active) { - /* IE11's high contrast show will not show the background image, so we show the text. */ - & .visually-hidden { - position: static; - overflow: visible; - clip: auto; - width: auto; - height: auto; - text-align: center; - } - - /* Edge's high contrast does show the background image, so we hide it. */ - & .icon--search { - display: none; - } - } } /* 500px is the width of the primary nav at mobile. */ diff --git a/core/themes/olivero/css/components/header-search-wide.css b/core/themes/olivero/css/components/header-search-wide.css index 60700bad44dd..67603e21e3f3 100644 --- a/core/themes/olivero/css/components/header-search-wide.css +++ b/core/themes/olivero/css/components/header-search-wide.css @@ -18,7 +18,6 @@ .block-search-wide__wrapper { position: absolute; - z-index: 1; /* Ensure left border shows above social region in IE11. */ inset-block-start: 100%; inset-inline-start: calc(-1 * var(--content-left)); display: none; @@ -138,23 +137,6 @@ transform: scaleX(1); } -@media screen and (-ms-high-contrast: active) { - .block-search-wide__wrapper .search-form__submit:focus { - border-bottom-width: var(--sp0-5); - } - - .block-search-wide__wrapper .search-form__submit:focus span::after { - content: none; - } -} - -@media screen and (-ms-high-contrast: active) { - /* Edge's high contrast does show the background image, so we hide it. */ - .block-search-wide__wrapper .search-form__submit .icon--search { - display: none; - } -} - .block-search-wide__container { max-width: var(--max-width); padding-inline-end: var(--sp2); diff --git a/core/themes/olivero/css/components/header-search-wide.pcss.css b/core/themes/olivero/css/components/header-search-wide.pcss.css index 6c60f28d708d..9b45d0cf8c35 100644 --- a/core/themes/olivero/css/components/header-search-wide.pcss.css +++ b/core/themes/olivero/css/components/header-search-wide.pcss.css @@ -12,7 +12,6 @@ .block-search-wide__wrapper { position: absolute; - z-index: 1; /* Ensure left border shows above social region in IE11. */ inset-block-start: 100%; inset-inline-start: calc(-1 * var(--content-left)); display: none; @@ -127,21 +126,6 @@ & span::after { transform: scaleX(1); } - - @media screen and (-ms-high-contrast: active) { - border-bottom-width: var(--sp0-5); - - & span::after { - content: none; - } - } - } - - @media screen and (-ms-high-contrast: active) { - /* Edge's high contrast does show the background image, so we hide it. */ - & .icon--search { - display: none; - } } } } diff --git a/core/themes/olivero/css/components/navigation/nav-primary-no-js.css b/core/themes/olivero/css/components/navigation/nav-primary-no-js.css index d9a0aacbb5bf..c5c46d4930e9 100644 --- a/core/themes/olivero/css/components/navigation/nav-primary-no-js.css +++ b/core/themes/olivero/css/components/navigation/nav-primary-no-js.css @@ -123,17 +123,8 @@ * Styles for traditional dropdown primary navigation when JS is disabled. */ html:not(.js) body:not(.is-always-mobile-nav) .primary-nav__menu-item--level-1:hover .primary-nav__menu--level-2, - html:not(.js) body:not(.is-always-mobile-nav) .primary-nav__menu-item--level-1:hover .primary-nav__menu-🥕 { - visibility: visible; - transform: translate(-50%, 0); - opacity: 1; - } - - /* - * Cannot combine the focus-within pseudo selector with other selectors, - * because it will break IE11 and earlier versions of MS Edge. - */ html:not(.js) body:not(.is-always-mobile-nav) .primary-nav__menu-item--level-1:focus-within .primary-nav__menu--level-2, + html:not(.js) body:not(.is-always-mobile-nav) .primary-nav__menu-item--level-1:hover .primary-nav__menu-🥕, html:not(.js) body:not(.is-always-mobile-nav) .primary-nav__menu-item--level-1:focus-within .primary-nav__menu-🥕 { visibility: visible; transform: translate(-50%, 0); diff --git a/core/themes/olivero/css/components/navigation/nav-primary-no-js.pcss.css b/core/themes/olivero/css/components/navigation/nav-primary-no-js.pcss.css index 409c1fc8fbae..0e93a169c319 100644 --- a/core/themes/olivero/css/components/navigation/nav-primary-no-js.pcss.css +++ b/core/themes/olivero/css/components/navigation/nav-primary-no-js.pcss.css @@ -124,19 +124,7 @@ html:not(.js) { * Styles for traditional dropdown primary navigation when JS is disabled. */ & body:not(.is-always-mobile-nav) { - & .primary-nav__menu-item--level-1:hover { - & .primary-nav__menu--level-2, - & .primary-nav__menu-🥕 { - visibility: visible; - transform: translate(-50%, 0); - opacity: 1; - } - } - - /* - * Cannot combine the focus-within pseudo selector with other selectors, - * because it will break IE11 and earlier versions of MS Edge. - */ + & .primary-nav__menu-item--level-1:hover, & .primary-nav__menu-item--level-1:focus-within { & .primary-nav__menu--level-2, & .primary-nav__menu-🥕 { diff --git a/core/themes/olivero/css/components/navigation/nav-primary-wide.css b/core/themes/olivero/css/components/navigation/nav-primary-wide.css index 6b21c65d67f2..50179032ffc0 100644 --- a/core/themes/olivero/css/components/navigation/nav-primary-wide.css +++ b/core/themes/olivero/css/components/navigation/nav-primary-wide.css @@ -47,7 +47,6 @@ border-radius: 0.25rem; } body:not(.is-always-mobile-nav) .primary-nav__menu-link--button.primary-nav__menu-link--has-children { - overflow: visible; /* Necessary to view icon in IE11 */ padding-inline-end: 0.5625rem; } diff --git a/core/themes/olivero/css/components/navigation/nav-primary-wide.pcss.css b/core/themes/olivero/css/components/navigation/nav-primary-wide.pcss.css index 9d67e67556c7..db6b05465d51 100644 --- a/core/themes/olivero/css/components/navigation/nav-primary-wide.pcss.css +++ b/core/themes/olivero/css/components/navigation/nav-primary-wide.pcss.css @@ -48,7 +48,6 @@ body:not(.is-always-mobile-nav) { & .primary-nav__menu-link--button { &.primary-nav__menu-link--has-children { - overflow: visible; /* Necessary to view icon in IE11 */ padding-inline-end: 9px; &:focus::before { diff --git a/core/themes/olivero/css/components/node.css b/core/themes/olivero/css/components/node.css index 8a4dae22bb2f..a3502e338e07 100644 --- a/core/themes/olivero/css/components/node.css +++ b/core/themes/olivero/css/components/node.css @@ -50,7 +50,7 @@ text-decoration: none; color: var(--color-text-neutral-loud); background-color: transparent; - background-image: linear-gradient(var(--color--primary-50), var(--color--primary-50)); /* Two values are needed for IE11 support. */ + background-image: linear-gradient(var(--color--primary-50)); background-repeat: no-repeat; background-position: bottom left; /* LTR */ background-size: 0 0.1875rem; diff --git a/core/themes/olivero/css/components/node.pcss.css b/core/themes/olivero/css/components/node.pcss.css index 109e1cac4d2b..727e3cc70083 100644 --- a/core/themes/olivero/css/components/node.pcss.css +++ b/core/themes/olivero/css/components/node.pcss.css @@ -43,7 +43,7 @@ text-decoration: none; color: var(--color-text-neutral-loud); background-color: transparent; - background-image: linear-gradient(var(--color--primary-50), var(--color--primary-50)); /* Two values are needed for IE11 support. */ + background-image: linear-gradient(var(--color--primary-50)); background-repeat: no-repeat; background-position: bottom left; /* LTR */ background-size: 0 3px; diff --git a/core/themes/olivero/css/components/search-results.css b/core/themes/olivero/css/components/search-results.css index a57ec430189d..8de82845ff83 100644 --- a/core/themes/olivero/css/components/search-results.css +++ b/core/themes/olivero/css/components/search-results.css @@ -41,7 +41,7 @@ -webkit-text-decoration: none; text-decoration: none; background-color: transparent; - background-image: linear-gradient(var(--color--primary-50), var(--color--primary-50)); /* Two values are needed for IE11 support. */ + background-image: linear-gradient(var(--color--primary-50)); background-repeat: no-repeat; background-position: bottom left; /* LTR */ background-size: 0 0.1875rem; diff --git a/core/themes/olivero/css/components/search-results.pcss.css b/core/themes/olivero/css/components/search-results.pcss.css index 592ef3c7d32a..c38b745e5af0 100644 --- a/core/themes/olivero/css/components/search-results.pcss.css +++ b/core/themes/olivero/css/components/search-results.pcss.css @@ -32,7 +32,7 @@ color 0.2s; text-decoration: none; background-color: transparent; - background-image: linear-gradient(var(--color--primary-50), var(--color--primary-50)); /* Two values are needed for IE11 support. */ + background-image: linear-gradient(var(--color--primary-50)); background-repeat: no-repeat; background-position: bottom left; /* LTR */ background-size: 0 3px; |