Add PHPUnit testing framework and error checking documentation

This commit is contained in:
2025-04-22 22:42:11 +01:00
parent a17a574a7e
commit 5f598f0f7e
9 changed files with 500 additions and 5 deletions

25
phpunit.xml.dist Normal file
View File

@@ -0,0 +1,25 @@
<?xml version="1.0"?>
<phpunit
bootstrap="tests/phpunit/bootstrap.php"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
>
<testsuites>
<testsuite name="plugin">
<directory prefix="test-" suffix=".php">./tests/phpunit/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./includes</directory>
<exclude>
<directory suffix=".php">./vendor</directory>
<directory suffix=".php">./tests</directory>
<directory suffix=".php">./node_modules</directory>
</exclude>
</whitelist>
</filter>
</phpunit>