mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-25 09:36:13 +01:00

[TASK] Add a PHPUnit example configuration file (#16)

This commit is contained in:
Oliver Klee 2018-05-26 19:50:59 +02:00 committed by GitHub
parent f4e67349ff
commit 1b8c800443
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 0 deletions

View file

@ -62,6 +62,11 @@ script:
echo "Running the unit tests";
composer ci:tests:unit;
- >
echo;
echo "Running the model tests";
.Build/vendor/bin/phpunit -c Configuration/PHPUnit/ModelTests.xml;
- >
echo;
echo "Running the functional tests";

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.5/phpunit.xsd"
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="../../.Build/vendor/nimut/testing-framework/res/Configuration/UnitTestsBootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false"
>
<testsuites>
<testsuite name="Model unit tests">
<directory>../../Tests/Unit/Domain/Model</directory>
</testsuite>
</testsuites>
</phpunit>

View file

@ -58,6 +58,12 @@ In the Run configurations, copy the PHPUnit configuration and use these settings
- [x] Use alternative configuration file
- use `.Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml`
### Example PHPUnit configuration file with a test suite
The file [`Configuration/PHPUnit/ModelTests.xml`](Configuration/PHPUnit/ModelTests.xml)
contains an example of a PHPUnit configuration file that has a test suite
(based on the unit tests configuration file from the testing framework).
## Creating new extensions with automated tests
For creating new extensions, I recommend taking