Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@localheinz
Copy link
Owner

This pull request

  • declares test code in subdirectories of test/

@localheinz localheinz self-assigned this Mar 3, 2023
@localheinz localheinz requested a review from ergebnis-bot as a code owner March 3, 2023 08:39
@localheinz localheinz force-pushed the feature/separate-directories branch 2 times, most recently from 93a865f to 1ae92a8 Compare March 3, 2023 09:23
@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@d732079). Click here to learn what that means.

❗ Current head 497c2f7 differs from pull request most recent head 30c271d. Consider uploading reports for the commit 30c271d to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##             main        #6   +/-   ##
========================================
  Coverage        ?   100.00%           
  Complexity      ?         8           
========================================
  Files           ?         3           
  Lines           ?        16           
  Branches        ?         0           
========================================
  Hits            ?        16           
  Misses          ?         0           
  Partials        ?         0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@localheinz localheinz force-pushed the feature/separate-directories branch 2 times, most recently from 499f7d9 to ba4e80b Compare March 3, 2023 09:50
@@ -1,5 +1,6 @@
/.github/ export-ignore
/.phive/ export-ignore
/test/ export-ignore
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you work on a package and declare test code in separate directories, adding exclusions for test code in .gitattributes is less work.

Comment on lines +39 to +43
"autoload-dev": {
"psr-4": {
"Localheinz\\OrganizingTestCodeInPhp\\Test\\": "test/"
}
},
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you declare test code in separate directories, 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.

Comment on lines +11 to +15
"source": {
"directories": [
"src"
]
},
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you declare test code in separate directories, managing exclusions for infection/infection in infection.json is unnecessary.

phpunit.xml Outdated
Comment on lines 28 to 30
<include>
<directory suffix=".php">src/</directory>
</include>
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you declare test code in separate directories, managing exclusions for collecting code coverage with phpunit/phpunit in phpunit.xml is unnecessary.

@localheinz localheinz force-pushed the feature/separate-directories branch 2 times, most recently from 501f8b4 to 497c2f7 Compare September 20, 2023 11:24
@localheinz localheinz force-pushed the feature/separate-directories branch 2 times, most recently from 69e0ff5 to 89e20b5 Compare January 2, 2024 11:26
@localheinz localheinz force-pushed the feature/separate-directories branch from 89e20b5 to 30c271d Compare January 2, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants