mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-15 20:16:13 +01:00
tea/Build/phpunit/UnitTests.xml
Stefan Bürk 41b44c28a4 [TASK] Avoid using testing-framework boilerplate files
typo3/testing-framework provides some template files as kickstart
for project and extension based testing. They are properly marked
to be copied and not used directly from the package. The reason
for this recommendation is, that project should make adjustments
to theire concrete setup, like coverage settings and so on.

This change clonses the corresponding template files from the
testing-framework to folders in this extension, adjusts needed
paths and ensure testing is still working. With that this best
practice example follows the recommendation and best-practice
for typo3/testing-framework usage.

Tasks

* provided cloned unit- and function test configuration and
  bootstrap files in `Build/phpunit/`
* updated cloned phpunit configuration files to be phpunit v9
  compatible, removing old coverage tag as this is done by
  cli options in this repository anyway
* add proper xml namespacing to cloned phpunit configurations
* adjustes config paths in unit and functional testing calls
  provided as composer scripts
* adjusted phpunit configuration files in documentation

Resolves #533
2022-10-16 01:55:38 +02:00

45 lines
1.5 KiB
XML

<!--
Unit test suite setup.
Unit tests should extend \TYPO3\TestingFramework\Core\Tests\UnitTestCase,
take a look at this class for further documentation on how to run the suite.
TYPO3 CMS unit test suite also needs phpunit bootstrap code, the
file is located next to this .xml as UnitTestsBootstrap.php
-->
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
backupGlobals="true"
bootstrap="UnitTestsBootstrap.php"
cacheResult="false"
colors="true"
convertDeprecationsToExceptions="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
convertNoticesToExceptions="true"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false"
beStrictAboutTestsThatDoNotTestAnything="true"
failOnWarning="true"
failOnRisky="true"
>
<testsuites>
<testsuite name="Unit tests">
<!--
This path either needs an adaption in extensions, or an extension's
test location path needs to be given to phpunit.
-->
<directory>../../Tests/Unit/</directory>
</testsuite>
</testsuites>
<php>
<ini name="display_errors" value="1" />
<env name="TYPO3_CONTEXT" value="Testing" />
</php>
</phpunit>