Skip to content

Commit

Permalink
OXDEV-7845 Make running local version of phpunit and codeception poss…
Browse files Browse the repository at this point in the history
…ible

Signed-off-by: Anton Fedurtsya <[email protected]>
  • Loading branch information
Sieg committed Apr 24, 2024
1 parent 31f23e4 commit 1c2be6c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
14 changes: 12 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@
"phpunit/phpunit": "^10.4",
"oxid-esales/oxideshop-ce": "dev-b-7.1.x",
"mikey179/vfsstream": "~1.6.8",
"phpmd/phpmd": "^2.15"
"phpmd/phpmd": "^2.15",
"codeception/codeception": "^5.0",
"codeception/module-asserts": "^3.0",
"codeception/module-db": "^3.0",
"codeception/module-filesystem": "^3.0",
"codeception/module-webdriver": "^4.0",
"oxid-esales/codeception-modules": "dev-b-7.1.x",
"oxid-esales/codeception-page-objects": "dev-b-7.1.x"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -61,7 +68,10 @@
"tests-integration": "vendor/bin/phpunit --bootstrap=/var/www/source/bootstrap.php --config=tests/ --testsuite=Integration",
"tests-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --bootstrap=/var/www/source/bootstrap.php --config=tests/ --coverage-html=tests/result/coverage",

"tests-codeception": "THEME_ID=apex MODULE_IDS=ddoemedialibrary /var/www/vendor/bin/codecept run Acceptance -c /var/www/vendor/oxid-esales/media-library-module/tests/codeception.yml",
"tests-codeception": [
"Composer\\Config::disableProcessTimeout",
"MODULE_IDS=ddoemedialibrary SHOP_ROOT_PATH=/var/www/ vendor/bin/codecept run Acceptance -c tests/codeception.yml"
],

"tests-all": [
"@tests-unit",
Expand Down
6 changes: 5 additions & 1 deletion tests/Codeception/Config/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
use OxidEsales\Facts\Config\ConfigFile;
use OxidEsales\Facts\Facts;

if ($shopRootPath = getenv('SHOP_ROOT_PATH')){
require_once($shopRootPath . '/source/bootstrap.php');
}

$facts = new Facts();
return [
'SHOP_URL' => $facts->getShopUrl(),
Expand All @@ -30,7 +34,7 @@
'BROWSER_NAME' => getenv('BROWSER_NAME') ?: 'chrome',
'PHP_BIN' => getenv('PHPBIN') ?: 'php',
'SCREEN_SHOT_URL' => getenv('CC_SCREEN_SHOTS_PATH') ?: '',
'THEME_ID' => getenv('THEME_ID') ?: 'twig'
'THEME_ID' => getenv('THEME_ID') ?: 'apex'
];

function getTestDataDumpFilePath(): string
Expand Down

0 comments on commit 1c2be6c

Please sign in to comment.