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 <anton@fedurtsya.com>
  • Loading branch information
Sieg committed Apr 24, 2024
1 parent c07deca commit 20025a2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
16 changes: 13 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@
"phpstan/phpstan": "^1.8.11",
"squizlabs/php_codesniffer": "3.*",
"oxid-esales/oxideshop-ce": "dev-b-7.1.x",
"phpunit/phpunit": "^10.4"
"phpunit/phpunit": "^10.4",
"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 All @@ -54,12 +61,15 @@
"tests-integration": "XDEBUG_MODE=coverage 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=ddoewysiwyg /var/www/vendor/bin/codecept run Acceptance -c /var/www/vendor/ddoe/wysiwyg-editor-module/tests/codeception.yml"
"tests-codeception": [
"Composer\\Config::disableProcessTimeout",
"THEME_ID=apex MODULE_IDS=ddoemedialibrary,ddoewysiwyg SHOP_ROOT_PATH=/var/www vendor/bin/codecept run Acceptance -c tests/codeception.yml"
]
},
"config": {
"allow-plugins": {
"oxid-esales/oxideshop-unified-namespace-generator": true,
"oxid-esales/oxideshop-composer-plugin": true
"oxid-esales/oxideshop-composer-plugin": false
}
}
}
4 changes: 4 additions & 0 deletions tests/Codeception/Config/params.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
use OxidEsales\Codeception\Module\Database\DatabaseDefaultsFileGenerator;
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(),
Expand Down

0 comments on commit 20025a2

Please sign in to comment.