From fd884b2ec2ee3606d685863dd865c37bfa1cf66e Mon Sep 17 00:00:00 2001 From: orakili Date: Mon, 2 Dec 2024 18:22:27 +0000 Subject: [PATCH] chore: do not run the reliefweb_entraid tests if the module is disabled Refs: OPS-10828 --- .../tests/src/ExistingSite/ReliefwebEntraidLoginTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/html/modules/custom/reliefweb_entraid/tests/src/ExistingSite/ReliefwebEntraidLoginTest.php b/html/modules/custom/reliefweb_entraid/tests/src/ExistingSite/ReliefwebEntraidLoginTest.php index a925ff088..3100b3609 100644 --- a/html/modules/custom/reliefweb_entraid/tests/src/ExistingSite/ReliefwebEntraidLoginTest.php +++ b/html/modules/custom/reliefweb_entraid/tests/src/ExistingSite/ReliefwebEntraidLoginTest.php @@ -49,6 +49,12 @@ protected function tearDown(): void { * @covers ::redirectLogin() */ public function testRedirectLogin() { + // Skip if the module is not installed. + if (!$this->container->get('module_handler')->moduleExists('reliefweb_entraid')) { + $this->assertTrue(TRUE); + return; + } + // Get the EntraID configuration. $entraid_config = $this->container ->get('config.factory')