diff --git a/modules/custom/az_cas/tests/src/Functional/AzCasDisableLoginFormTest.php b/modules/custom/az_cas/tests/src/Functional/AzCasDisableLoginFormTest.php index 925389465e..a2ba23ab1b 100644 --- a/modules/custom/az_cas/tests/src/Functional/AzCasDisableLoginFormTest.php +++ b/modules/custom/az_cas/tests/src/Functional/AzCasDisableLoginFormTest.php @@ -4,12 +4,15 @@ use Drupal\Core\Url; use Drupal\Tests\az_core\Functional\QuickstartFunctionalTestBase; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Tests that access to the user login form can be disabled. - * - * @group az_cas */ +#[Group('az_cas')] +#[RunTestsInSeparateProcesses] class AzCasDisableLoginFormTest extends QuickstartFunctionalTestBase { /** @@ -51,9 +54,8 @@ protected function setUp(): void { /** * Tests that access to the user login form is disabled. - * - * @dataProvider azCasSettingsProvider */ + #[DataProvider('azCasSettingsProvider')] public function testUserLoginFormBehavior($disable_login_form) { $edit = [ 'disable_login_form' => $disable_login_form, diff --git a/modules/custom/az_cas/tests/src/Functional/AzCasDisablePasswordResetTest.php b/modules/custom/az_cas/tests/src/Functional/AzCasDisablePasswordResetTest.php index 64d627d6d4..7183c424cb 100644 --- a/modules/custom/az_cas/tests/src/Functional/AzCasDisablePasswordResetTest.php +++ b/modules/custom/az_cas/tests/src/Functional/AzCasDisablePasswordResetTest.php @@ -3,12 +3,15 @@ namespace Drupal\Tests\az_cas\Functional; use Drupal\Tests\az_core\Functional\QuickstartFunctionalTestBase; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Tests that access to the password reset form can be disabled. - * - * @group az_cas */ +#[Group('az_cas')] +#[RunTestsInSeparateProcesses] class AzCasDisablePasswordResetTest extends QuickstartFunctionalTestBase { /** @@ -50,9 +53,8 @@ protected function setUp(): void { /** * Tests that access to the password reset form is disabled. - * - * @dataProvider azCasSettingsProvider */ + #[DataProvider('azCasSettingsProvider')] public function testPasswordResetBehavior($disable_password_recovery_link) { $edit = [ 'disable_password_recovery_link' => $disable_password_recovery_link, diff --git a/modules/custom/az_cas/tests/src/Functional/AzCasTest.php b/modules/custom/az_cas/tests/src/Functional/AzCasTest.php index 9fdd8b0335..c6c25dbf68 100644 --- a/modules/custom/az_cas/tests/src/Functional/AzCasTest.php +++ b/modules/custom/az_cas/tests/src/Functional/AzCasTest.php @@ -4,12 +4,14 @@ use Drupal\Core\Url; use Drupal\Tests\az_core\Functional\QuickstartFunctionalTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Tests for the AZ CAS module. - * - * @group az_cas */ +#[Group('az_cas')] +#[RunTestsInSeparateProcesses] class AzCasTest extends QuickstartFunctionalTestBase { /** diff --git a/modules/custom/az_core/az_enterprise_attributes_import/tests/src/Functional/EnterpriseAttributesImportTest.php b/modules/custom/az_core/az_enterprise_attributes_import/tests/src/Functional/EnterpriseAttributesImportTest.php index 25f184a455..af75139148 100644 --- a/modules/custom/az_core/az_enterprise_attributes_import/tests/src/Functional/EnterpriseAttributesImportTest.php +++ b/modules/custom/az_core/az_enterprise_attributes_import/tests/src/Functional/EnterpriseAttributesImportTest.php @@ -5,12 +5,14 @@ use Drupal\Tests\BrowserTestBase; use Drupal\migrate\MigrateMessage; use Drupal\migrate_tools\MigrateExecutable; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Test of attribute import functionality. - * - * @group az_enterprise_attributes_import */ +#[Group('az_enterprise_attributes_import')] +#[RunTestsInSeparateProcesses] class EnterpriseAttributesImportTest extends BrowserTestBase { /** diff --git a/modules/custom/az_core/tests/src/Functional/CacheInvalidationTest.php b/modules/custom/az_core/tests/src/Functional/CacheInvalidationTest.php index e4dadaded1..0d91a06cf4 100644 --- a/modules/custom/az_core/tests/src/Functional/CacheInvalidationTest.php +++ b/modules/custom/az_core/tests/src/Functional/CacheInvalidationTest.php @@ -3,12 +3,14 @@ namespace Drupal\Tests\az_core\Functional; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Tests cache invalidation when nodes are updated. - * - * @group az_core */ +#[Group('az_core')] +#[RunTestsInSeparateProcesses] class CacheInvalidationTest extends BrowserTestBase { /** diff --git a/modules/custom/az_core/tests/src/Functional/ClearCacheTest.php b/modules/custom/az_core/tests/src/Functional/ClearCacheTest.php index 92d36a459f..e516aecb03 100644 --- a/modules/custom/az_core/tests/src/Functional/ClearCacheTest.php +++ b/modules/custom/az_core/tests/src/Functional/ClearCacheTest.php @@ -3,12 +3,14 @@ namespace Drupal\Tests\az_core\Functional; use Drupal\Core\Url; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Test to ensure the Quickstart settings clear cache button works correctly. - * - * @group az_core */ +#[Group('az_core')] +#[RunTestsInSeparateProcesses] class ClearCacheTest extends QuickstartFunctionalTestBase { /** diff --git a/modules/custom/az_core/tests/src/Functional/ConfigOverrideTest.php b/modules/custom/az_core/tests/src/Functional/ConfigOverrideTest.php index 6c86fa6236..0eea4ab359 100644 --- a/modules/custom/az_core/tests/src/Functional/ConfigOverrideTest.php +++ b/modules/custom/az_core/tests/src/Functional/ConfigOverrideTest.php @@ -3,14 +3,14 @@ namespace Drupal\Tests\az_core\Functional; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Test to ensure Quickstart configuration overrides work correctly. - * - * @ingroup az_core - * - * @group az_core */ +#[Group('az_core')] +#[RunTestsInSeparateProcesses] class ConfigOverrideTest extends BrowserTestBase { /** diff --git a/modules/custom/az_core/tests/src/Functional/MonitoringPageTest.php b/modules/custom/az_core/tests/src/Functional/MonitoringPageTest.php index f1c0a6f70e..a91afad984 100644 --- a/modules/custom/az_core/tests/src/Functional/MonitoringPageTest.php +++ b/modules/custom/az_core/tests/src/Functional/MonitoringPageTest.php @@ -3,12 +3,14 @@ namespace Drupal\Tests\az_core\Functional; use Drupal\Core\Url; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Test to ensure that monitoring page works correctly. - * - * @group az_core */ +#[Group('az_core')] +#[RunTestsInSeparateProcesses] class MonitoringPageTest extends QuickstartFunctionalTestBase { /** diff --git a/modules/custom/az_core/tests/src/Unit/AZBootstrapMarkupConverterTest.php b/modules/custom/az_core/tests/src/Unit/AZBootstrapMarkupConverterTest.php index dafddb441a..79f6d8efd9 100644 --- a/modules/custom/az_core/tests/src/Unit/AZBootstrapMarkupConverterTest.php +++ b/modules/custom/az_core/tests/src/Unit/AZBootstrapMarkupConverterTest.php @@ -4,19 +4,19 @@ use Drupal\az_core\Utility\AZBootstrapMarkupConverter; use Drupal\Tests\UnitTestCase; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** * Tests the AZ Bootstrap markup converter. - * - * @group az_core */ +#[Group('az_core')] class AZBootstrapMarkupConverterTest extends UnitTestCase { /** * Test fragments are converted correctly without adding document tags. - * - * @dataProvider provideFragments */ + #[DataProvider('provideFragments')] public function testFragmentConversion($input, $expected) { $result = AZBootstrapMarkupConverter::convert($input); $this->assertEquals($expected, $result); @@ -33,9 +33,8 @@ public function testCompareProcessorNoChanges() { /** * Test that compareProcessor returns converted text when changes are needed. - * - * @dataProvider provideFragments */ + #[DataProvider('provideFragments')] public function testCompareProcessor($input, $expected) { $result = AZBootstrapMarkupConverter::compareProcessor($input); $this->assertEquals($expected, $result, 'Text with Bootstrap classes should be converted'); diff --git a/modules/custom/az_demo/tests/src/Functional/AZDemoContentTest.php b/modules/custom/az_demo/tests/src/Functional/AZDemoContentTest.php index fe612d5a96..24846c271e 100644 --- a/modules/custom/az_demo/tests/src/Functional/AZDemoContentTest.php +++ b/modules/custom/az_demo/tests/src/Functional/AZDemoContentTest.php @@ -5,12 +5,14 @@ use Drupal\Core\Url; use Drupal\Core\Config\FileStorage; use Drupal\Tests\az_core\Functional\QuickstartFunctionalTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Verify successful importing of demo content. - * - * @group az_demo */ +#[Group('az_demo')] +#[RunTestsInSeparateProcesses] class AZDemoContentTest extends QuickstartFunctionalTestBase { /** diff --git a/modules/custom/az_finder/tests/AZFinderIconsTest.php b/modules/custom/az_finder/tests/AZFinderIconsTest.php index 9a46a66379..dabae9d19e 100644 --- a/modules/custom/az_finder/tests/AZFinderIconsTest.php +++ b/modules/custom/az_finder/tests/AZFinderIconsTest.php @@ -5,13 +5,13 @@ namespace Drupal\Tests\az_finder\Unit; use Drupal\az_finder\Service\AZFinderIcons; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; /** * Tests the AZFinderIcons class. - * - * @group az_finder */ +#[Group('az_finder')] class AZFinderIconsTest extends TestCase { /** diff --git a/modules/custom/az_global_footer/tests/src/Functional/AzGlobalFooterTest.php b/modules/custom/az_global_footer/tests/src/Functional/AzGlobalFooterTest.php index e0aff8c05d..8b1257edf7 100644 --- a/modules/custom/az_global_footer/tests/src/Functional/AzGlobalFooterTest.php +++ b/modules/custom/az_global_footer/tests/src/Functional/AzGlobalFooterTest.php @@ -3,12 +3,15 @@ namespace Drupal\Tests\az_global_footer\Functional; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Tests the Quickstart Global Footer. - * - * @group az_global_footer */ +#[Group('az_global_footer')] +#[RunTestsInSeparateProcesses] class AzGlobalFooterTest extends BrowserTestBase { /** @@ -32,9 +35,9 @@ class AzGlobalFooterTest extends BrowserTestBase { /** * Tests that the Quickstart Global Footer module can be uninstalled. - * - * @group regression */ + #[Group('regression')] + #[DoesNotPerformAssertions] public function testIsUninstallableAndReinstallable() { // Uninstalls the az_global_footer module, so hook_modules_uninstalled() diff --git a/modules/custom/az_migration/tests/src/Functional/MigrateExceptionsTest.php b/modules/custom/az_migration/tests/src/Functional/MigrateExceptionsTest.php index cdd5141434..b5ccbcddbb 100644 --- a/modules/custom/az_migration/tests/src/Functional/MigrateExceptionsTest.php +++ b/modules/custom/az_migration/tests/src/Functional/MigrateExceptionsTest.php @@ -3,12 +3,14 @@ namespace Drupal\Tests\az_migration\Functional; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Tests the Quickstart Global Footer. - * - * @group az_global_footer */ +#[Group('az_global_footer')] +#[RunTestsInSeparateProcesses] class MigrateExceptionsTest extends BrowserTestBase { /** @@ -39,8 +41,6 @@ class MigrateExceptionsTest extends BrowserTestBase { /** * Tests that the Quickstart Global Footer module can be installed. - * - * @group regression */ public function testGlobalFooterMigration() { // Install the az_global_footer module. diff --git a/modules/custom/az_paragraphs/tests/src/Functional/AZParagraphsTest.php b/modules/custom/az_paragraphs/tests/src/Functional/AZParagraphsTest.php index 9d9e91cb2c..cb2e79b2cb 100644 --- a/modules/custom/az_paragraphs/tests/src/Functional/AZParagraphsTest.php +++ b/modules/custom/az_paragraphs/tests/src/Functional/AZParagraphsTest.php @@ -3,14 +3,14 @@ namespace Drupal\Tests\az_paragraphs\Functional; use Drupal\Tests\az_core\Functional\QuickstartFunctionalTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Run tests of paragraph bundles. - * - * @ingroup az_paragraphs - * - * @group az_paragraphs */ +#[Group('az_paragraphs')] +#[RunTestsInSeparateProcesses] class AZParagraphsTest extends QuickstartFunctionalTestBase { /** diff --git a/modules/custom/az_paragraphs/tests/src/FunctionalJavascript/AZParagraphsJavascriptTest.php b/modules/custom/az_paragraphs/tests/src/FunctionalJavascript/AZParagraphsJavascriptTest.php index 979bdac761..e4d97c3da0 100644 --- a/modules/custom/az_paragraphs/tests/src/FunctionalJavascript/AZParagraphsJavascriptTest.php +++ b/modules/custom/az_paragraphs/tests/src/FunctionalJavascript/AZParagraphsJavascriptTest.php @@ -3,14 +3,18 @@ namespace Drupal\Tests\az_paragraphs\FunctionalJavascript; use Drupal\Tests\az_core\FunctionalJavascript\QuickstartFunctionalJavascriptTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; +use PHPUnit\Framework\Attributes\IgnorePhpunitDeprecations; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Run tests of paragraph bundles. - * - * @ingroup az_paragraphs_js - * - * @group az_paragraphs_js */ +#[Group('az_paragraphs_js')] +#[IgnoreDeprecations] +#[IgnorePhpunitDeprecations] +#[RunTestsInSeparateProcesses] class AZParagraphsJavascriptTest extends QuickstartFunctionalJavascriptTestBase { /** diff --git a/modules/custom/az_paragraphs/tests/src/Unit/AZVideoEmbedHelperTest.php b/modules/custom/az_paragraphs/tests/src/Unit/AZVideoEmbedHelperTest.php index 73388239ab..057d09b8a1 100644 --- a/modules/custom/az_paragraphs/tests/src/Unit/AZVideoEmbedHelperTest.php +++ b/modules/custom/az_paragraphs/tests/src/Unit/AZVideoEmbedHelperTest.php @@ -4,14 +4,15 @@ use Drupal\Tests\UnitTestCase; use Drupal\az_paragraphs\AZVideoEmbedHelper; +use PHPUnit\Framework\Attributes\CoversClass; +use PHPUnit\Framework\Attributes\DataProvider; +use PHPUnit\Framework\Attributes\Group; /** - * @coversDefaultClass \Drupal\az_paragraphs\AZVideoEmbedHelper - * - * @ingroup az_paragraphs - * - * @group az_paragraphs + * Test coverage for AZVideoEmbedHelper class. */ +#[CoversClass(AZVideoEmbedHelper::class)] +#[Group('az_paragraphs')] class AZVideoEmbedHelperTest extends UnitTestCase { /** @@ -29,11 +30,8 @@ protected function setUp(): void { /** * Tests parsing of YouTube video ID from URLs. - * - * @covers ::getYoutubeIdFromUrl - * - * @dataProvider providerYouTubeVideoData */ + #[DataProvider('providerYouTubeVideoData')] public function testGetYoutubeIdFromUrl($youtube_url, $expected_id) { $this->assertEquals($expected_id, $this->videoEmbedHelper->getYoutubeIdFromUrl($youtube_url)); } diff --git a/modules/custom/az_publication/tests/src/FunctionalJavascript/AZPublicationInlineContributorTest.php b/modules/custom/az_publication/tests/src/FunctionalJavascript/AZPublicationInlineContributorTest.php index 05cda80308..4d8f1632c8 100644 --- a/modules/custom/az_publication/tests/src/FunctionalJavascript/AZPublicationInlineContributorTest.php +++ b/modules/custom/az_publication/tests/src/FunctionalJavascript/AZPublicationInlineContributorTest.php @@ -3,14 +3,18 @@ namespace Drupal\Tests\az_publication\FunctionalJavascript; use Drupal\Tests\az_core\FunctionalJavascript\QuickstartFunctionalJavascriptTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\IgnoreDeprecations; +use PHPUnit\Framework\Attributes\IgnorePhpunitDeprecations; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Run tests of publication contributor role functionality. - * - * @ingroup az_publication - * - * @group az_publication */ +#[Group('az_publication')] +#[IgnoreDeprecations] +#[IgnorePhpunitDeprecations] +#[RunTestsInSeparateProcesses] class AZPublicationInlineContributorTest extends QuickstartFunctionalJavascriptTestBase { /** diff --git a/modules/custom/az_select_menu/tests/src/Functional/AzSelectMenuTest.php b/modules/custom/az_select_menu/tests/src/Functional/AzSelectMenuTest.php index 2be7902a00..bbca30096a 100644 --- a/modules/custom/az_select_menu/tests/src/Functional/AzSelectMenuTest.php +++ b/modules/custom/az_select_menu/tests/src/Functional/AzSelectMenuTest.php @@ -3,12 +3,15 @@ namespace Drupal\Tests\az_select_menu\Functional; use Drupal\Tests\BrowserTestBase; +use PHPUnit\Framework\Attributes\DoesNotPerformAssertions; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Tests the Quickstart select menu block. - * - * @group az_select_menu */ +#[Group('az_select_menu')] +#[RunTestsInSeparateProcesses] class AzSelectMenuTest extends BrowserTestBase { /** @@ -32,9 +35,8 @@ class AzSelectMenuTest extends BrowserTestBase { /** * Tests that the Quickstart Select Menu Block module can be uninstalled. - * - * @group az_select_menu */ + #[DoesNotPerformAssertions] public function testIsUninstallableAndReinstallable() { // Uninstalls the az_select_menu module, so hook_modules_uninstalled() diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5da264db22..8e2bf38a27 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -5,11 +5,14 @@ beStrictAboutTestsThatDoNotTestAnything="true" beStrictAboutOutputDuringTests="true" beStrictAboutChangesToGlobalState="true" - failOnRisky="false" - failOnWarning="false" + failOnRisky="true" + failOnWarning="true" + failOnDeprecation="true" + failOnPhpunitDeprecation="false" displayDetailsOnTestsThatTriggerErrors="true" displayDetailsOnTestsThatTriggerWarnings="true" displayDetailsOnTestsThatTriggerDeprecations="true" + displayDetailsOnPhpunitDeprecations="true" cacheResult="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" cacheDirectory=".phpunit.cache"> diff --git a/themes/custom/az_barrio/tests/src/Functional/AzBarrioAdminTest.php b/themes/custom/az_barrio/tests/src/Functional/AzBarrioAdminTest.php index dfb76b5d98..f3484bffe0 100644 --- a/themes/custom/az_barrio/tests/src/Functional/AzBarrioAdminTest.php +++ b/themes/custom/az_barrio/tests/src/Functional/AzBarrioAdminTest.php @@ -3,12 +3,14 @@ namespace Drupal\Tests\az_barrio\Functional; use Drupal\Tests\az_core\Functional\QuickstartFunctionalTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Tests the Arizona Barrio theme as an admin user. - * - * @group az_barrio */ +#[Group('az_barrio')] +#[RunTestsInSeparateProcesses] class AzBarrioAdminTest extends QuickstartFunctionalTestBase { /** diff --git a/themes/custom/az_barrio/tests/src/Functional/AzBarrioTest.php b/themes/custom/az_barrio/tests/src/Functional/AzBarrioTest.php index c542cf684f..8dc04c49c7 100644 --- a/themes/custom/az_barrio/tests/src/Functional/AzBarrioTest.php +++ b/themes/custom/az_barrio/tests/src/Functional/AzBarrioTest.php @@ -3,12 +3,14 @@ namespace Drupal\Tests\az_barrio\Functional; use Drupal\Tests\az_core\Functional\QuickstartFunctionalTestBase; +use PHPUnit\Framework\Attributes\Group; +use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; /** * Tests the Arizona Barrio theme. - * - * @group az_barrio */ +#[Group('az_barrio')] +#[RunTestsInSeparateProcesses] class AzBarrioTest extends QuickstartFunctionalTestBase { /**