Skip to content

Commit

Permalink
Fix shop test data path calculation
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Fedurtsya <anton@fedurtsya.com>
  • Loading branch information
Sieg committed Nov 26, 2024
1 parent 4fd3ec6 commit c008f9e
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions tests/Codeception/Config/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,16 @@ function getTestFixtureSqlFilePath(): string
return getShopTestPath() . '/Codeception/Support/Data/dump.sql';
}

function getShopSuitePath($facts): string
{
$testSuitePath = getenv('TEST_SUITE');
if (!$testSuitePath) {
$testSuitePath = $facts->getShopRootPath() . '/tests';
}

return $testSuitePath;
}

function getShopTestPath(): string
{
$facts = new Facts();

if ($facts->isEnterprise()) {
$shopTestPath = $facts->getEnterpriseEditionRootPath() . '/Tests';
} elseif ($facts->isProfessional()) {
$shopTestPath = $facts->getProfessionalEditionRootPath() . '/Tests';
} else {
$shopTestPath = getShopSuitePath($facts);
$shopTestPath = $facts->getCommunityEditionRootPath() . '/tests';
}

return $shopTestPath;
Expand Down

0 comments on commit c008f9e

Please sign in to comment.