Skip to content

Commit 2a54f95

Browse files
committed
test(structure): split unit and integration suites; update tooling
- Move all existing tests under tests/Unit/ to prepare for dedicated integration tests. - Add empty tests/Integration/ suite in phpunit.xml. - Update phpunit.xml to define separate "unit" and "integration" test suites. - composer.json: - Add `test` script (all tests) and `test:unit` for unit suite only. - Makefile: - Update `test` target to run new composer test scripts. - Add `test-unit` target. This allows running unit tests by default (make test / composer run test:unit) while keeping integration tests isolated and triggered manually.
1 parent 5aad44e commit 2a54f95

26 files changed

+13
-6
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ lint:
99
composer run lint
1010

1111
test:
12-
composer run phpunit
12+
composer run test
13+
14+
test-unit:
15+
composer run test:unit

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
],
3838
"scripts": {
3939
"lint": "vendor/bin/phpcs --standard=phpcs.xml",
40-
"phpunit": "vendor/bin/phpunit --testdox --colors=always --log-junit .phpunit.junit.xml"
40+
"test": "vendor/bin/phpunit --testdox --colors=always --log-junit .phpunit.junit.xml",
41+
"test:unit": "vendor/bin/phpunit --testsuite unit --testdox --colors=always --log-junit .phpunit.junit.xml"
4142
}
4243
}

phpunit.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
colors="true"
44
verbose="true">
55
<testsuites>
6-
<testsuite name="Bblslug Test Suite">
7-
<directory>tests</directory>
6+
<testsuite name="unit">
7+
<directory>tests/Unit</directory>
8+
</testsuite>
9+
<testsuite name="integration">
10+
<directory>tests/Integration</directory>
811
</testsuite>
912
</testsuites>
1013
</phpunit>
File renamed without changes.

0 commit comments

Comments
 (0)