Loading .recipes.gitlab-ci.yml +1 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ core-tests: BROWSERTEST_OUTPUT_DIRECTORY: "sites/simpletest/browser_output" BROWSERTEST_OUTPUT_FILE: "test-output.html" MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"chromeOptions": { "args": [ "--disable-gpu", "--headless" ] } }, "http://127.0.0.1:4444/wd/hub" ]' CORE_TESTS: "core/modules/config/tests/src/Functional/ConfigImportUITest.php core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php core/tests/Drupal/KernelTests/Core/DependencyInjection/AutoconfigurationTest.php core/tests/Drupal/KernelTests/Config/TypedConfigTest.php" CORE_TESTS: "core/modules/config/tests/src/Functional/ConfigImportUITest.php core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php core/tests/Drupal/KernelTests/Core/DependencyInjection/AutoconfigurationTest.php core/tests/Drupal/KernelTests/Config/TypedConfigTest.php core/profiles/standard/tests/src/Functional/StandardTest.php" # SYMFONY_DEPRECATIONS_HELPER: "max[self]=0" before_script: - ln -s $CI_PROJECT_DIR /var/www/html/subdirectory Loading core/profiles/standard/tests/src/Functional/StandardTest.php +10 −2 Original line number Diff line number Diff line Loading @@ -187,8 +187,7 @@ function (ConstraintViolation $v) { // Make sure the optional image styles are installed after enabling // the responsive_image module. \Drupal::service('module_installer')->install(['responsive_image']); $this->rebuildContainer(); $this->installResponsiveImage(); $this->drupalGet('admin/config/media/image-styles'); $this->assertSession()->pageTextContains('Max 325x325'); $this->assertSession()->pageTextContains('Max 650x650'); Loading Loading @@ -312,4 +311,13 @@ function (ConstraintViolation $v) { $this->assertSession()->statusCodeEquals(403); } /** * Installs the responsive image module. */ protected function installResponsiveImage(): void { // Install responsive_image module. \Drupal::service('module_installer')->install(['responsive_image']); $this->rebuildContainer(); } } core/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeTest.php +4 −17 Original line number Diff line number Diff line Loading @@ -141,24 +141,11 @@ public function testStandard(): void { /** * {@inheritdoc} * * @todo https://www.drupal.org/i/3439750 Remove this. */ protected function rebuildContainer(): void { // Compare the module list before and after the container is rebuilt, to // determine if any modules were installed. $modules_before = array_keys($this->container->get('module_handler')->getModuleList()); parent::rebuildContainer(); $modules_after = array_keys($this->container->get('module_handler')->getModuleList()); // If responsive_image was installed, apply the recipe that provides the // responsive image styles. We cannot just do this unconditionally, because // the parent class explicitly asserts that the image styles don't exist // if responsive_image is not installed. $installed = array_diff($modules_after, $modules_before); if (in_array('responsive_image', $installed, TRUE)) { protected function installResponsiveImage(): void { // Overrides StandardTest::installResponsiveImage() in order to use the // recipe. $this->applyRecipe('core/recipes/standard_responsive_images'); } } } Loading
.recipes.gitlab-ci.yml +1 −1 Original line number Diff line number Diff line Loading @@ -167,7 +167,7 @@ core-tests: BROWSERTEST_OUTPUT_DIRECTORY: "sites/simpletest/browser_output" BROWSERTEST_OUTPUT_FILE: "test-output.html" MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"chromeOptions": { "args": [ "--disable-gpu", "--headless" ] } }, "http://127.0.0.1:4444/wd/hub" ]' CORE_TESTS: "core/modules/config/tests/src/Functional/ConfigImportUITest.php core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php core/tests/Drupal/KernelTests/Core/DependencyInjection/AutoconfigurationTest.php core/tests/Drupal/KernelTests/Config/TypedConfigTest.php" CORE_TESTS: "core/modules/config/tests/src/Functional/ConfigImportUITest.php core/modules/jsonapi/tests/src/Functional/ConfigTestTest.php core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php core/tests/Drupal/KernelTests/Core/DependencyInjection/AutoconfigurationTest.php core/tests/Drupal/KernelTests/Config/TypedConfigTest.php core/profiles/standard/tests/src/Functional/StandardTest.php" # SYMFONY_DEPRECATIONS_HELPER: "max[self]=0" before_script: - ln -s $CI_PROJECT_DIR /var/www/html/subdirectory Loading
core/profiles/standard/tests/src/Functional/StandardTest.php +10 −2 Original line number Diff line number Diff line Loading @@ -187,8 +187,7 @@ function (ConstraintViolation $v) { // Make sure the optional image styles are installed after enabling // the responsive_image module. \Drupal::service('module_installer')->install(['responsive_image']); $this->rebuildContainer(); $this->installResponsiveImage(); $this->drupalGet('admin/config/media/image-styles'); $this->assertSession()->pageTextContains('Max 325x325'); $this->assertSession()->pageTextContains('Max 650x650'); Loading Loading @@ -312,4 +311,13 @@ function (ConstraintViolation $v) { $this->assertSession()->statusCodeEquals(403); } /** * Installs the responsive image module. */ protected function installResponsiveImage(): void { // Install responsive_image module. \Drupal::service('module_installer')->install(['responsive_image']); $this->rebuildContainer(); } }
core/tests/Drupal/FunctionalTests/Core/Recipe/StandardRecipeTest.php +4 −17 Original line number Diff line number Diff line Loading @@ -141,24 +141,11 @@ public function testStandard(): void { /** * {@inheritdoc} * * @todo https://www.drupal.org/i/3439750 Remove this. */ protected function rebuildContainer(): void { // Compare the module list before and after the container is rebuilt, to // determine if any modules were installed. $modules_before = array_keys($this->container->get('module_handler')->getModuleList()); parent::rebuildContainer(); $modules_after = array_keys($this->container->get('module_handler')->getModuleList()); // If responsive_image was installed, apply the recipe that provides the // responsive image styles. We cannot just do this unconditionally, because // the parent class explicitly asserts that the image styles don't exist // if responsive_image is not installed. $installed = array_diff($modules_after, $modules_before); if (in_array('responsive_image', $installed, TRUE)) { protected function installResponsiveImage(): void { // Overrides StandardTest::installResponsiveImage() in order to use the // recipe. $this->applyRecipe('core/recipes/standard_responsive_images'); } } }