chore : bootstrap infrastructure PHPUnit 12

This commit is contained in:
2026-04-21 08:11:52 +02:00
parent 818d930f24
commit 579c1df495
4 changed files with 30 additions and 1 deletions

View File

@@ -86,4 +86,9 @@ php-cs-fixer-allow-risky:
$(EXEC_PHP_CS_FIXER) fix --config=.php-cs-fixer.dist.php --allow-risky=yes $(FILES)
wait:
sleep 10
sleep 10
# Lance la suite PHPUnit. Usage : make test (tout)
# make test FILES=<path> (un fichier/dossier)
test:
$(EXEC_PHP) php vendor/bin/phpunit $(FILES)

19
phpunit.xml.dist Normal file
View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="tests/bootstrap.php"
colors="true"
failOnWarning="true"
failOnRisky="true"
cacheDirectory=".phpunit.cache">
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>src</directory>
</include>
</source>
</phpunit>

0
tests/Unit/.gitkeep Normal file
View File

5
tests/bootstrap.php Normal file
View File

@@ -0,0 +1,5 @@
<?php
declare(strict_types=1);
require __DIR__.'/../vendor/autoload.php';