mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-12 09:02:06 -06:00
Update test scripts [skip ci]
This commit is contained in:
parent
b6aa79bb38
commit
90d58c5c39
42
phpunit.coverage.xml
Executable file
42
phpunit.coverage.xml
Executable file
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
bootstrap="bootstrap/autoload.php"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
beStrictAboutOutputDuringTests="true"
|
||||||
|
stopOnFailure="true">
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="acceptance">
|
||||||
|
<directory suffix="Test.php">./tests/acceptance</directory>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="unit">
|
||||||
|
<directory suffix="Test.php">./tests/unit</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<whitelist addUncoveredFilesFromWhitelist="true">
|
||||||
|
<directory suffix=".php">./app</directory>
|
||||||
|
</whitelist>
|
||||||
|
<blacklist>
|
||||||
|
<directory>vendor/</directory>
|
||||||
|
</blacklist>
|
||||||
|
</filter>
|
||||||
|
<logging>
|
||||||
|
<log type="coverage-clover" target="./storage/build/clover.xml" charset="UTF-8"/>
|
||||||
|
</logging>
|
||||||
|
<php>
|
||||||
|
<env name="APP_ENV" value="testing"/>
|
||||||
|
<env name="CACHE_DRIVER" value="array"/>
|
||||||
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
|
<env name="QUEUE_DRIVER" value="sync"/>
|
||||||
|
</php>
|
||||||
|
</phpunit>
|
21
phpunit.xml
21
phpunit.xml
@ -7,19 +7,28 @@
|
|||||||
convertNoticesToExceptions="true"
|
convertNoticesToExceptions="true"
|
||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
processIsolation="false"
|
processIsolation="false"
|
||||||
|
beStrictAboutOutputDuringTests="true"
|
||||||
stopOnFailure="true">
|
stopOnFailure="true">
|
||||||
<listeners>
|
|
||||||
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener" />
|
|
||||||
</listeners>
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Application Test Suite">
|
<testsuite name="acceptance">
|
||||||
<directory suffix="Test.php">./tests</directory>
|
<directory suffix="Test.php">./tests/acceptance</directory>
|
||||||
|
</testsuite>
|
||||||
|
<testsuite name="unit">
|
||||||
|
<directory suffix="Test.php">./tests/unit</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
|
||||||
|
<listeners>
|
||||||
|
<listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener"/>
|
||||||
|
</listeners>
|
||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
<whitelist addUncoveredFilesFromWhitelist="true">
|
||||||
<directory suffix=".php">./app</directory>
|
<directory suffix=".php">./app</directory>
|
||||||
</whitelist>
|
</whitelist>
|
||||||
|
<blacklist>
|
||||||
|
<directory>vendor/</directory>
|
||||||
|
</blacklist>
|
||||||
</filter>
|
</filter>
|
||||||
<php>
|
<php>
|
||||||
<env name="APP_ENV" value="testing"/>
|
<env name="APP_ENV" value="testing"/>
|
||||||
|
18
test.sh
18
test.sh
@ -12,8 +12,9 @@ testflag=''
|
|||||||
coverageflag=''
|
coverageflag=''
|
||||||
acceptancetestclass=''
|
acceptancetestclass=''
|
||||||
verbalflag=''
|
verbalflag=''
|
||||||
|
testsuite=''
|
||||||
|
|
||||||
while getopts 'vcrta:' flag; do
|
while getopts 'vcrta:s:' flag; do
|
||||||
case "${flag}" in
|
case "${flag}" in
|
||||||
r)
|
r)
|
||||||
resetestflag='true'
|
resetestflag='true'
|
||||||
@ -25,12 +26,17 @@ while getopts 'vcrta:' flag; do
|
|||||||
coverageflag='true'
|
coverageflag='true'
|
||||||
;;
|
;;
|
||||||
v)
|
v)
|
||||||
verbalflag=' -v'
|
verbalflag=' -v --debug'
|
||||||
|
echo "Will be verbal about it"
|
||||||
;;
|
;;
|
||||||
a)
|
a)
|
||||||
acceptancetestclass=./tests/acceptance/$OPTARG
|
acceptancetestclass=./tests/acceptance/$OPTARG
|
||||||
echo "Will only run acceptance test $OPTARG"
|
echo "Will only run acceptance test $OPTARG"
|
||||||
;;
|
;;
|
||||||
|
s)
|
||||||
|
testsuite="--testsuite $OPTARG"
|
||||||
|
echo "Will only run test suite '$OPTARG'"
|
||||||
|
;;
|
||||||
*) error "Unexpected option ${flag}" ;;
|
*) error "Unexpected option ${flag}" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
@ -85,11 +91,13 @@ else
|
|||||||
|
|
||||||
if [[ $coverageflag == "" ]]
|
if [[ $coverageflag == "" ]]
|
||||||
then
|
then
|
||||||
echo "Must run PHPUnit without coverage"
|
echo "Must run PHPUnit without coverage:"
|
||||||
phpunit --stop-on-error $verbalflag $acceptancetestclass
|
echo "phpunit --stop-on-error $verbalflag $acceptancetestclass $testsuite"
|
||||||
|
phpunit --stop-on-error $verbalflag $acceptancetestclass $testsuite
|
||||||
else
|
else
|
||||||
echo "Must run PHPUnit with coverage"
|
echo "Must run PHPUnit with coverage"
|
||||||
phpunit --stop-on-error $verbalflag --configuration phpunit.coverage.xml $acceptancetestclass
|
echo "phpunit --stop-on-error $verbalflag --configuration phpunit.coverage.xml $acceptancetestclass $testsuite"
|
||||||
|
phpunit --stop-on-error $verbalflag --configuration phpunit.coverage.xml $acceptancetestclass $testsuite
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user