Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Update test scripts [skip ci]
James Cole90d58c5c393d
diff --git a/phpunit.coverage.xml b/phpunit.coverage.xmlnew file mode 100755index 0000000000..75e3afd143--- /dev/null+++ b/phpunit.coverage.xml@@ -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>diff --git a/phpunit.xml b/phpunit.xmlindex 5e3d64c04c..d439428075 100755--- a/phpunit.xml+++ b/phpunit.xml@@ -7,19 +7,28 @@convertNoticesToExceptions="true"convertWarningsToExceptions="true"processIsolation="false"+ beStrictAboutOutputDuringTests="true"stopOnFailure="true">- <listeners>- <listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener" />- </listeners><testsuites>- <testsuite name="Application Test Suite">- <directory suffix="Test.php">./tests</directory>+ <testsuite name="acceptance">+ <directory suffix="Test.php">./tests/acceptance</directory>+ </testsuite>+ <testsuite name="unit">+ <directory suffix="Test.php">./tests/unit</directory></testsuite></testsuites>++ <listeners>+ <listener class="JohnKary\PHPUnit\Listener\SpeedTrapListener"/>+ </listeners>+<filter>- <whitelist processUncoveredFilesFromWhitelist="true">+ <whitelist addUncoveredFilesFromWhitelist="true"><directory suffix=".php">./app</directory></whitelist>+ <blacklist>+ <directory>vendor/</directory>+ </blacklist></filter><php><env name="APP_ENV" value="testing"/>diff --git a/test.sh b/test.shindex b1e52c6932..6e6e8065c7 100755--- a/test.sh+++ b/test.sh@@ -12,8 +12,9 @@ testflag=''coverageflag=''acceptancetestclass=''verbalflag=''+testsuite=''-while getopts 'vcrta:' flag; do+while getopts 'vcrta:s:' flag; docase "${flag}" inr)resetestflag='true'@@ -25,12 +26,17 @@ while getopts 'vcrta:' flag; docoverageflag='true';;v)- verbalflag=' -v'+ verbalflag=' -v --debug'+ echo "Will be verbal about it";;a)acceptancetestclass=./tests/acceptance/$OPTARGecho "Will only run acceptance test $OPTARG";;+ s)+ testsuite="--testsuite $OPTARG"+ echo "Will only run test suite '$OPTARG'"+ ;;*) error "Unexpected option ${flag}" ;;esacdone@@ -85,11 +91,13 @@ elseif [[ $coverageflag == "" ]]then- echo "Must run PHPUnit without coverage"- phpunit --stop-on-error $verbalflag $acceptancetestclass+ echo "Must run PHPUnit without coverage:"+ echo "phpunit --stop-on-error $verbalflag $acceptancetestclass $testsuite"+ phpunit --stop-on-error $verbalflag $acceptancetestclass $testsuiteelseecho "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 $testsuitefifi