Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Declare test code in subdirectories with separate configuration files #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

localheinz
Copy link
Owner

This pull request

  • declares test code in subdirectories of src/ with separate configuration files

@localheinz localheinz self-assigned this Mar 3, 2023
@localheinz localheinz force-pushed the feature/subdirectories-with-separate-configuration-files branch 2 times, most recently from b9fc574 to 23afcf0 Compare March 3, 2023 08:59
@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.

Additional details and impacted files
@@           Coverage Diff            @@
##             main        #4   +/-   ##
========================================
  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/subdirectories-with-separate-configuration-files branch 4 times, most recently from a4680d9 to 9256734 Compare March 8, 2023 11:47
@@ -1,5 +1,6 @@
/.github/ export-ignore
/.phive/ export-ignore
/src/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 subdirectories of the production code with separate configuration files, adding exclusions for test code in .gitattributes is even less work.

There is no need to add configuration files as they are in the excluded directory.

Comment on lines +28 to +39
<exclude>
<directory>.</directory>
<directory>../Performance/</directory>
<directory>../Util/</directory>
</exclude>
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 subdirectories of production code with separate configuration files, managing exclusions for collecting code coverage with phpunit/phpunit in phpunit.xml is a lot of work.

Comment on lines +38 to +40
"exclude-from-classmap": [
"/src/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 subdirectories of production code with separate configuration files, managing exclusions for the composer autoloader in composer.json is less work.

@localheinz localheinz force-pushed the feature/subdirectories-with-separate-configuration-files branch 2 times, most recently from 0098fa7 to 4782eb6 Compare September 20, 2023 11:22
@localheinz localheinz force-pushed the feature/subdirectories-with-separate-configuration-files branch 2 times, most recently from 590dafa to f3af23a Compare January 2, 2024 11:25
@localheinz localheinz force-pushed the feature/subdirectories-with-separate-configuration-files branch from f3af23a to 00227cf 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.

None yet

2 participants