Skip to content

Commit

Permalink
Merge pull request #15 from edmondscommerce/magento2-basic-phpunit
Browse files Browse the repository at this point in the history
Reinstated basic phpunit script
  • Loading branch information
Edmonds Commerce committed May 11, 2018
2 parents 81b5299 + a6e71eb commit ed763a6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions includes/magento2/phpunit.inc.bash
@@ -0,0 +1,26 @@
#!/bin/bash

set +e
phpCmd=phpNoXdebug
if [[ "1" == "$phpUnitCoverage" ]]
then
phpCmd=\php
fi

qaQuickTests="$phpUnitQuickTests" $phpCmd -f bin/phpunit \
-- \
-c $phpUnitConfigPath

phpunitExitCode=$?
set +x
if (( phpunitExitCode > 0 ))
then
if (( phpunitExitCode > 2 ))
then
printf "\n\n\nPHPUnit Crashed\n\nRunning again with Debug mode...\n\n\n"
qaQuickTests="$phpUnitQuickTests" phpNoXdebug -f bin/phpunit -- --debug
set +x
fi
exit $phpunitExitCode
fi
set -e

0 comments on commit ed763a6

Please sign in to comment.