diff --git a/.gitlab-ci/pipeline.yml b/.gitlab-ci/pipeline.yml index ee6f1e0e1769214f4a64d8075734239d2d7c60ab..6e9bd8bb1f9002fd46ff5195008a5cd138797d49 100644 --- a/.gitlab-ci/pipeline.yml +++ b/.gitlab-ci/pipeline.yml @@ -113,7 +113,7 @@ variables: echo ' "Key" to "REPEAT_TEST_CLASS" and "Value" to "Drupal\Tests\ckeditor5\FunctionalJavascript\MediaLinkabilityTest"'; exit 1; else - sudo -u www-data -E -H php ./core/scripts/run-tests.sh --color --keep-results --concurrency "$CONCURRENCY" --repeat "100" --sqlite "./sites/default/files/tests.sqlite" --dburl $SIMPLETEST_DB --url $SIMPLETEST_BASE_URL --verbose --non-html --class $REPEAT_TEST_CLASS + sudo -u www-data -E -H php ./core/scripts/run-tests.sh --color --keep-results --concurrency "$CONCURRENCY" --repeat "1000" --sqlite "./sites/default/files/tests.sqlite" --dburl $SIMPLETEST_DB --url $SIMPLETEST_BASE_URL --verbose --non-html --class $REPEAT_TEST_CLASS fi ################ @@ -241,7 +241,7 @@ variables: when: manual allow_failure: true variables: - REPEAT_TEST_CLASS: 'Drupal\Tests\Change\Me' + REPEAT_TEST_CLASS: '\Drupal\Tests\system\Functional\Theme\ToolbarClaroOverridesTest' services: - <<: *with-database diff --git a/core/.phpstan-baseline.php b/core/.phpstan-baseline.php index 95ec5db246676f52d168446a67ab25e39f7a5623..c99db935f3a6ecab28a3137e34137168cbee0bd8 100644 --- a/core/.phpstan-baseline.php +++ b/core/.phpstan-baseline.php @@ -21111,12 +21111,6 @@ 'count' => 1, 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/NodeTest.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\NodeTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/modules/jsonapi/tests/src/Functional/NodeTest.php', -]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\Tests\\\\jsonapi\\\\Functional\\\\ResourceTestBase\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', @@ -21987,12 +21981,6 @@ 'count' => 1, 'path' => __DIR__ . '/modules/language/tests/language_test/src/Controller/LanguageTestController.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\ConfigurableLanguageManagerTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php', -]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\Tests\\\\language\\\\Functional\\\\LanguageBreadcrumbTest\\:\\:assertBreadcrumb\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', @@ -24261,12 +24249,6 @@ 'count' => 1, 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleImportFunctionalTest.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocaleLocaleLookupTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/modules/locale/tests/src/Functional/LocaleLocaleLookupTest.php', -]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\Tests\\\\locale\\\\Functional\\\\LocalePathTest\\:\\:assertPathAliasExists\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', @@ -29475,12 +29457,6 @@ 'count' => 1, 'path' => __DIR__ . '/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraintValidator.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Functional\\\\PathAliasTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/modules/path/tests/src/Functional/PathAliasTest.php', -]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\Tests\\\\path\\\\Functional\\\\PathContentModerationTest\\:\\:addEntityTypeAndBundleToWorkflow\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', @@ -36577,12 +36553,6 @@ 'count' => 1, 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/CronRunTest.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\CronRunTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/src/Functional/System/CronRunTest.php', -]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\Tests\\\\system\\\\Functional\\\\System\\\\DateTimeTest\\:\\:assertFieldDoesNotExist\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', @@ -47449,12 +47419,6 @@ 'count' => 1, 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayFeedTranslationTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/modules/views/tests/src/Functional/Plugin/DisplayFeedTranslationTest.php', -]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\Tests\\\\views\\\\Functional\\\\Plugin\\\\DisplayPageWebTest\\:\\:assertCacheContext\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', @@ -49885,12 +49849,6 @@ 'count' => 1, 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\PathWorkspacesTest\\:\\:setWaitForTerminate\\(\\) has no return type specified\\.$#', - 'identifier' => 'missingType.return', - 'count' => 1, - 'path' => __DIR__ . '/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php', -]; $ignoreErrors[] = [ 'message' => '#^Method Drupal\\\\Tests\\\\workspaces\\\\Functional\\\\PathWorkspacesTest\\:\\:setupWorkspaceSwitcherBlock\\(\\) has no return type specified\\.$#', 'identifier' => 'missingType.return', diff --git a/core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php b/core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php index ec113eeab86ae0180ce4538abc989e14c0c57b52..ae0f9c9cd94726d81113bde196042f3892d16dbe 100644 --- a/core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php +++ b/core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php @@ -6,6 +6,7 @@ use Drupal\Core\Theme\ThemeManagerInterface; use Drupal\Tests\BrowserTestBase; +use Drupal\Tests\WaitTerminateTestTrait; /** * Tests the loading of Claro assets on a non-Claro default theme. @@ -14,6 +15,8 @@ */ class ToolbarClaroOverridesTest extends BrowserTestBase { + use WaitTerminateTestTrait; + /** * {@inheritdoc} */ @@ -56,6 +59,8 @@ protected function setUp(): void { 'administer shortcuts', 'access content overview', ])); + + $this->setWaitForTerminate(); } /** diff --git a/core/tests/Drupal/Tests/WaitTerminateTestTrait.php b/core/tests/Drupal/Tests/WaitTerminateTestTrait.php index 2423af83f9dd9d65f3c0e4828269da5f37a06c36..ad629abbae4ec6fc6b7954adfb899edab48ad34d 100644 --- a/core/tests/Drupal/Tests/WaitTerminateTestTrait.php +++ b/core/tests/Drupal/Tests/WaitTerminateTestTrait.php @@ -16,7 +16,7 @@ trait WaitTerminateTestTrait { * Tests with assertions which operate on data computed during the terminate * event need to enable this. */ - protected function setWaitForTerminate() { + protected function setWaitForTerminate(): void { $this->container->get('state')->set('drupal.test_wait_terminate', TRUE); }