Skip to content

Commit 8a3502b

Browse files
authored
Packages tests (#10)
* Moved unit tests to their respective packages * Added dev autoload for tests in every package * Normalize .gitignore files * Add tests dir to git export-ignore * Updated tests configuration to be able to run all tests * Add tests config for each package * Updated to PhpUnit 9.4
1 parent 89ab8b2 commit 8a3502b

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.gitattributes export-ignore
22
.gitignore export-ignore
33
docs/ export-ignore
4+
tests/ export-ignore
45
LICENSE export-ignore
56
*.md export-ignore

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
vendor/
2-
composer.lock
1+
/.phpunit.result.cache
2+
/vendor/
3+
/composer.lock

composer.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,13 @@
2020
"psr-4": {
2121
"Yokai\\Batch\\Bridge\\Symfony\\Framework\\": "src/"
2222
}
23+
},
24+
"require-dev": {
25+
"phpunit/phpunit": "^9.4"
26+
},
27+
"autoload-dev": {
28+
"psr-4": {
29+
"Yokai\\Batch\\Tests\\Bridge\\Symfony\\Framework\\": "tests/"
30+
}
2331
}
2432
}

phpunit.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
4+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
6+
backupGlobals="false"
7+
colors="true"
8+
bootstrap="vendor/autoload.php"
9+
>
10+
<testsuites>
11+
<testsuite name="Tests">
12+
<directory>./tests</directory>
13+
</testsuite>
14+
</testsuites>
15+
16+
<coverage>
17+
<include>
18+
<directory>./src</directory>
19+
</include>
20+
</coverage>
21+
</phpunit>

0 commit comments

Comments
 (0)