Improve phpunit testsuites, add script for unit tests

This commit is contained in:
Art4 2024-11-10 00:12:47 +00:00
parent bbf7e4a936
commit 5305286312
2 changed files with 11 additions and 4 deletions

View file

@ -156,6 +156,7 @@
}, },
"scripts": { "scripts": {
"test": "phpunit", "test": "phpunit",
"test:unit": "phpunit -c tests/phpunit.xml --testsuite unit",
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './view/asset/*' -print0 | xargs -0 -n1 php -l", "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './view/asset/*' -print0 | xargs -0 -n1 php -l",
"docker:translate": "docker run --rm -v $PWD:/data -w /data friendicaci/transifex bin/run_xgettext.sh", "docker:translate": "docker run --rm -v $PWD:/data -w /data friendicaci/transifex bin/run_xgettext.sh",
"cs:install": "@composer install --working-dir=bin/dev/php-cs-fixer", "cs:install": "@composer install --working-dir=bin/dev/php-cs-fixer",

View file

@ -7,10 +7,16 @@
timeoutForMediumTests="900" timeoutForMediumTests="900"
timeoutForLargeTests="900" timeoutForLargeTests="900"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<testsuite name="friendica"> <testsuites>
<directory suffix=".php">functional/</directory> <testsuite name="friendica">
<directory suffix=".php">src/</directory> <directory suffix=".php">functional/</directory>
</testsuite> <directory suffix=".php">src/</directory>
<directory suffix=".php">Unit/</directory>
</testsuite>
<testsuite name="unit">
<directory suffix=".php">Unit/</directory>
</testsuite>
</testsuites>
<!-- Filters for Code Coverage --> <!-- Filters for Code Coverage -->
<coverage> <coverage>
<include> <include>