Skip to content

Commit

Permalink
OXDEV-8316 Fix path to translation directory for codeception
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Fedurtsya <[email protected]>
  • Loading branch information
Sieg committed Oct 15, 2024
1 parent 2a974aa commit 917fc62
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions tests/Codeception/Acceptance.suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ modules:
- \OxidEsales\Codeception\Module\Translation\TranslationsModule:
shop_path: '%SHOP_SOURCE_PATH%'
paths:
- Application/views/apex
- Application/views/admin_twig
- ../vendor/oxid-esales/module-template/views/admin_twig
- ../vendor/oxid-esales/module-template/translations
- 'Application/views/apex'
- 'Application/views/admin_twig'
- '%SOURCE_RELATIVE_PACKAGE_PATH%/translations'
- '%SOURCE_RELATIVE_PACKAGE_PATH%/views/admin_twig'
- \OxidEsales\Codeception\Module\OxideshopModules
step_decorators:
- \Codeception\Step\Retry
10 changes: 6 additions & 4 deletions tests/Codeception/Config/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@
use OxidEsales\Facts\Facts;
use Symfony\Component\Filesystem\Path;

if ($shopRootPath = getenv('SHOP_ROOT_PATH')){
require_once(Path::join($shopRootPath, 'source', 'bootstrap.php'));
}

$facts = new Facts();

return [
'SHOP_URL' => $facts->getShopUrl(),
'SHOP_SOURCE_PATH' => $facts->getSourcePath(),
'SOURCE_RELATIVE_PACKAGE_PATH' => getSourceRelativePackagePath($facts),
'VENDOR_PATH' => $facts->getVendorPath(),
'DB_NAME' => $facts->getDatabaseName(),
'DB_USERNAME' => $facts->getDatabaseUserName(),
Expand All @@ -39,6 +36,11 @@
'THEME_ID' => getenv('THEME_ID') ?: 'apex',
];

function getSourceRelativePackagePath(Facts $facts): string
{
return str_replace($facts->getShopRootPath(), '..', __DIR__) . '/../../../';
}

function getTemporaryDataDumpFilePath(): string
{
return Path::join(__DIR__, '../Support', '_generated', 'dump.sql');
Expand Down

0 comments on commit 917fc62

Please sign in to comment.