update phpunit config

This commit is contained in:
Akolzin Dmitry 2020-03-04 17:59:20 +03:00
parent b15be0d7dd
commit 4a468344f9
4 changed files with 7 additions and 3 deletions

View File

@ -65,6 +65,7 @@ jobs:
env: BRANCH=1.7.5.x env: BRANCH=1.7.5.x
- php: 7.2 - php: 7.2
env: BRANCH=1.7.5.x env: BRANCH=1.7.5.x
after_success: bash <(curl -s https://codecov.io/bash)
before_script: make before_script before_script: make before_script

View File

@ -18,7 +18,7 @@ delete_archive:
rm -f $(ARCHIVE_NAME) rm -f $(ARCHIVE_NAME)
rm -f /tmp/retailcrm.zip rm -f /tmp/retailcrm.zip
composer: clone_prestashop composer:
@cd $(PRESTASHOP_DIR) && git checkout $(BRANCH) @cd $(PRESTASHOP_DIR) && git checkout $(BRANCH)
ifeq ($(COMPOSER_IN_TESTS),1) ifeq ($(COMPOSER_IN_TESTS),1)
@cd $(PRESTASHOP_DIR)/tests && composer install @cd $(PRESTASHOP_DIR)/tests && composer install
@ -56,6 +56,6 @@ test:
ifeq ($(COMPOSER_IN_TESTS),1) ifeq ($(COMPOSER_IN_TESTS),1)
phpunit phpunit
else else
cd $(PRESTASHOP_DIR) && composer run-script create-test-db --timeout=0 # cd $(PRESTASHOP_DIR) && composer run-script create-test-db --timeout=0
cd $(PRESTASHOP_DIR) && php vendor/bin/phpunit -c $(ROOT_DIR)/phpunit.xml.dist cd $(PRESTASHOP_DIR) && php vendor/bin/phpunit -c $(ROOT_DIR)/phpunit.xml.dist
endif endif

View File

@ -30,4 +30,7 @@
</exclude> </exclude>
</whitelist> </whitelist>
</filter> </filter>
<logging>
<log type="coverage-clover" target="coverage.xml"/>
</logging>
</phpunit> </phpunit>

View File

@ -1,6 +1,6 @@
<?php <?php
if (is_dir(__DIR__ . '/../../PrestaShop/tests-legacy')) { if (file_exists(__DIR__ . '/../../PrestaShop/tests-legacy')) {
require_once __DIR__ . '/../../PrestaShop/tests-legacy/bootstrap.php'; require_once __DIR__ . '/../../PrestaShop/tests-legacy/bootstrap.php';
} else { } else {
require_once __DIR__ . '/../../PrestaShop/tests/bootstrap.php'; require_once __DIR__ . '/../../PrestaShop/tests/bootstrap.php';