From 46b6ffac0ccba9f482edea4895f3fd057e1210fa Mon Sep 17 00:00:00 2001 From: hkreuter Date: Wed, 18 Dec 2024 10:03:44 +0100 Subject: [PATCH] OXDEV-8637 Have codeception module handle module activation --- tests/Codeception/Acceptance.suite.yml | 1 + tests/Codeception/Module/AcceptanceHelper.php | 20 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/tests/Codeception/Acceptance.suite.yml b/tests/Codeception/Acceptance.suite.yml index cd02a501..82e18e36 100644 --- a/tests/Codeception/Acceptance.suite.yml +++ b/tests/Codeception/Acceptance.suite.yml @@ -35,3 +35,4 @@ modules: - \OxidEsales\GraphQL\Base\Tests\Codeception\Module\AcceptanceHelper: depends: - REST + - \OxidEsales\Codeception\Module\OxideshopModules diff --git a/tests/Codeception/Module/AcceptanceHelper.php b/tests/Codeception/Module/AcceptanceHelper.php index ca6ed557..1c214395 100644 --- a/tests/Codeception/Module/AcceptanceHelper.php +++ b/tests/Codeception/Module/AcceptanceHelper.php @@ -18,7 +18,6 @@ use Lcobucci\JWT\Token; use Lcobucci\JWT\Token\Parser; use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory; -use OxidEsales\Facts\Facts; use OxidEsales\GraphQL\Base\Service\JwtConfigurationBuilder; use PHPUnit\Framework\AssertionFailedError; use Symfony\Component\BrowserKit\CookieJar; @@ -46,25 +45,6 @@ public function getRest(): REST return $this->rest; } - public function _beforeSuite($settings = []): void // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore - { - $rootPath = (new Facts())->getShopRootPath(); - $possiblePaths = [ - '/bin/oe-console', - '/vendor/bin/oe-console', - ]; - - foreach ($possiblePaths as $path) { - if (is_file($rootPath . $path)) { - exec($rootPath . $path . ' oe:module:activate oe_graphql_base'); - - return; - } - } - - throw new Exception('Could not find script "/bin/oe-console" to activate module'); - } - public function sendGQLQuery( string $query, ?array $variables = null,