Skip to content

Commit

Permalink
OXDEV-8637 Have codeception module handle module activation
Browse files Browse the repository at this point in the history
  • Loading branch information
hkreuter committed Dec 18, 2024
1 parent c17bb6f commit 46b6ffa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
1 change: 1 addition & 0 deletions tests/Codeception/Acceptance.suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ modules:
- \OxidEsales\GraphQL\Base\Tests\Codeception\Module\AcceptanceHelper:
depends:
- REST
- \OxidEsales\Codeception\Module\OxideshopModules
20 changes: 0 additions & 20 deletions tests/Codeception/Module/AcceptanceHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 46b6ffa

Please sign in to comment.