Enhancement: Declare test code in separate directories with separate configuration files#7
Conversation
98a35f1 to
f851116
Compare
| @@ -1,5 +1,6 @@ | |||
| /.github/ export-ignore | |||
| /.phive/ export-ignore | |||
| /test/ export-ignore | |||
There was a problem hiding this comment.
When you work on a package and declare test code in separate directories with separate configuration files, adding exclusions for test code in .gitattributes is less work.
There is no need to add configuration files as they are in the excluded directory.
| "autoload-dev": { | ||
| "psr-4": { | ||
| "Localheinz\\OrganizingTestCodeInPhp\\Test\\": "test/" | ||
| } | ||
| }, |
There was a problem hiding this comment.
When you declare test code in separate directories with separate configuration files, managing exclusions for the composer autoloader in composer.json is unnecessary. Instead, you configure and document namespaces for test code via an autoloader configuration in the autoload-dev section.
| "source": { | ||
| "directories": [ | ||
| "src" | ||
| ] | ||
| }, |
There was a problem hiding this comment.
When you declare test code in separate directories with separate configuration files, managing exclusions for infection/infection in infection.json is unnecessary.
| <include> | ||
| <directory suffix=".php">../../src/</directory> | ||
| </include> |
There was a problem hiding this comment.
When you declare test code in separate directories with separate configuration files, managing exclusions for collecting code coverage with phpunit/phpunit in phpunit.xml is unnecessary.
bcaa6e7 to
f4aee49
Compare
f4aee49 to
221c550
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7 +/- ##
========================================
Coverage ? 100.00%
Complexity ? 8
========================================
Files ? 3
Lines ? 16
Branches ? 0
========================================
Hits ? 16
Misses ? 0
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
221c550 to
8e33611
Compare
…configuration files
8e33611 to
c4165fb
Compare
This pull request
test/with separate configuration files