File tree 8 files changed +368
-411
lines changed
8 files changed +368
-411
lines changed Original file line number Diff line number Diff line change 1
1
/coverage
2
2
/vendor
3
+ /.phpunit.result.cache
3
4
4
5
/.env
5
6
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+
3
+ <!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
4
+ <phpunit
5
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
6
+ xsi : noNamespaceSchemaLocation =" vendor/phpunit/phpunit/phpunit.xsd"
7
+ bootstrap =" tests/bootstrap.php"
8
+ colors =" true"
9
+ displayDetailsOnIncompleteTests =" true"
10
+ displayDetailsOnSkippedTests =" true"
11
+ displayDetailsOnTestsThatTriggerDeprecations =" true"
12
+ displayDetailsOnTestsThatTriggerErrors =" true"
13
+ displayDetailsOnTestsThatTriggerNotices =" true"
14
+ displayDetailsOnTestsThatTriggerWarnings =" true"
15
+ displayDetailsOnPhpunitDeprecations =" true"
16
+ failOnDeprecation =" true"
17
+ failOnEmptyTestSuite =" true"
18
+ failOnIncomplete =" true"
19
+ failOnRisky =" true"
20
+ failOnSkipped =" true"
21
+ failOnWarning =" true"
22
+ testdox =" true"
23
+ testdoxSummary =" true"
24
+ >
25
+ <php >
26
+ <ini name =" display_errors" value =" 1" />
27
+ <ini name =" error_reporting" value =" -1" />
28
+ <server name =" APP_ENV" value =" test" force =" true" />
29
+ <server name =" SHELL_VERBOSITY" value =" -1" />
30
+ </php >
31
+
32
+ <testsuites >
33
+ <testsuite name =" Test Suite" >
34
+ <directory >tests</directory >
35
+ </testsuite >
36
+ </testsuites >
37
+
38
+ <source >
39
+ <include >
40
+ <directory suffix =" .php" >src</directory >
41
+ </include >
42
+ </source >
43
+ </phpunit >
Original file line number Diff line number Diff line change 12
12
COMPOSER = ./docker/bin/composer
13
13
endif
14
14
15
- ifndef COVERAGE
16
- COVERAGE = --coverage-html ./coverage
17
- endif
18
-
19
- ifdef FILTER
20
- PHPUNIT_FILTER = --filter=$(FILTER)
21
- else
22
- PHPUNIT_FILTER =
23
- endif
24
-
25
- ifdef FILE
26
- PHPUNIT_FILE = $(FILE)
27
- else
28
- PHPUNIT_FILE = ./tests
29
- endif
30
-
31
15
.PHONY : docker-start
32
16
docker-start : # # Start a development server
33
17
@echo " Running webserver on http://localhost:8000"
@@ -50,13 +34,13 @@ setup: .env ## Initialize the application
50
34
$(PHP ) cli migrations setup --seed
51
35
52
36
.PHONY : test
53
- test : # # Run the tests suite
54
- XDEBUG_MODE=coverage $( PHP ) ./vendor/bin/phpunit \
55
- $( COVERAGE ) --whitelist ./src \
56
- --bootstrap ./tests/bootstrap.php \
57
- --testdox \
58
- $( PHPUNIT_FILTER ) \
59
- $( PHPUNIT_FILE )
37
+ test : FILE ?= ./ tests
38
+ ifdef FILTER
39
+ test : override FILTER := --filter= $( FILTER )
40
+ endif
41
+ test : COVERAGE ?= --coverage-html ./coverage
42
+ test : # # Run the test suite (can take FILE, FILTER and COVERAGE arguments)
43
+ $( PHP ) ./vendor/bin/phpunit -c .phpunit.xml $( COVERAGE ) $( FILTER ) $( FILE )
60
44
61
45
.PHONY : lint
62
46
lint : # # Run the linters on the PHP files
Original file line number Diff line number Diff line change 6
6
7
7
"require-dev" : {
8
8
"phpstan/phpstan" : " ^1.10" ,
9
- "phpunit/phpunit" : " ^9.5 " ,
9
+ "phpunit/phpunit" : " ^11.0 " ,
10
10
"squizlabs/php_codesniffer" : " ^3.6"
11
11
},
12
12
You can’t perform that action at this time.
0 commit comments