Skip to content

Commit f483b30

Browse files
authored
Merge pull request #13 from netresearch/fix-phpunit-convention
fix(checkpoints): enforce TYPO3 extension PHPUnit convention
2 parents 01b899c + e608eeb commit f483b30

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

skills/typo3-testing/checkpoints.yaml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,48 @@ version: 1
55
skill_id: typo3-testing
66

77
mechanical:
8-
# === PHPUNIT CONFIGURATION ===
8+
# === PHPUNIT CONFIGURATION (TYPO3 Extension Convention) ===
9+
# TYPO3 extensions MUST use Build/UnitTests.xml and Build/FunctionalTests.xml
10+
# Root phpunit.xml is discouraged - use Build/ directory for test configs
11+
# Reference: https://github.com/TYPO3/testing-framework
12+
913
- id: TT-01
1014
type: file_exists
11-
target: "{phpunit.xml,Build/phpunit.xml}"
12-
severity: warning
13-
desc: "phpunit.xml should exist in project root or Build/ directory"
15+
target: Build/UnitTests.xml
16+
severity: error
17+
desc: "Build/UnitTests.xml must exist (TYPO3 extension convention)"
1418

1519
- id: TT-02
1620
type: file_exists
17-
target: Build/UnitTests.xml
18-
severity: info
19-
desc: "Build/UnitTests.xml alternative PHPUnit config location"
21+
target: Build/FunctionalTests.xml
22+
severity: error
23+
desc: "Build/FunctionalTests.xml must exist (TYPO3 extension convention)"
2024

2125
- id: TT-02b
2226
type: file_exists
2327
target: Build/Scripts/runTests.sh
2428
severity: info
25-
desc: "runTests.sh provides alternative to separate PHPUnit XML configs"
29+
desc: "runTests.sh script for Docker-based test execution"
2630

2731
- id: TT-03
28-
type: file_exists
29-
target: Build/FunctionalTests.xml
30-
severity: info
31-
desc: "Build/FunctionalTests.xml for functional test configuration"
32+
type: file_not_exists
33+
target: phpunit.xml
34+
severity: warning
35+
desc: "phpunit.xml in project root is discouraged; use Build/UnitTests.xml instead"
3236

3337
- id: TT-04
3438
type: regex
35-
target: "{phpunit.xml,Build/phpunit.xml}"
39+
target: Build/UnitTests.xml
3640
pattern: '<testsuite.*name="unit"'
37-
severity: warning
38-
desc: "PHPUnit config should define unit test suite"
41+
severity: error
42+
desc: "Build/UnitTests.xml must define unit test suite"
3943

4044
- id: TT-05
4145
type: regex
42-
target: "{phpunit.xml,Build/phpunit.xml}"
46+
target: Build/FunctionalTests.xml
4347
pattern: '<testsuite.*name="functional"'
44-
severity: info
45-
desc: "PHPUnit config should define functional test suite"
48+
severity: error
49+
desc: "Build/FunctionalTests.xml must define functional test suite"
4650

4751
# === TEST DIRECTORY STRUCTURE ===
4852
- id: TT-10

0 commit comments

Comments
 (0)