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 same directory #1

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 the src/ directory

@localheinz localheinz self-assigned this Mar 3, 2023
@localheinz localheinz force-pushed the feature/same-directory branch 2 times, most recently from 420ba1a to aea3253 Compare March 3, 2023 08:45
@codecov
Copy link

codecov bot commented Mar 3, 2023

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

@localheinz localheinz force-pushed the feature/same-directory branch 6 times, most recently from 0804a51 to 09ae621 Compare March 3, 2023 09:56
Comment on lines +4 to +8
/src/ExampleBench.php export-ignore
/src/ExampleTest.php export-ignore
/src/Helper.php export-ignore
/src/ValueCanNotBeBlankTest.php export-ignore
/src/ValueCanNotBeEmptyTest.php 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 the same directory as production code, adding exclusions for test code in .gitattributes is a lot of work.

Comment on lines +38 to +42
"exclude-from-classmap": [
"/src/*Bench.php",
"/src/*Test.php",
"/src/Helper.php"
]
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 the same directory as production code, managing exclusions for the composer autoloader in composer.json is a lot of work.

Comment on lines +15 to +21
"excludes": [
"ExampleBench.php",
"ExampleTest.php",
"Helper.php",
"ValueCanNotBeBlankTest.php",
"ValueCanNotBeEmptyTest.php"
]
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 the same directory as production code, managing exclusions for infection/infection in infection.json is a lot of work.

Comment on lines +28 to +39
<exclude>
<directory suffix="Bench.php">src/</directory>
<directory suffix="Test.php">src/</directory>
<file>src/Helper.php</file>
</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 the same directory as production code, managing exclusions for collecting code coverage with phpunit/phpunit in phpunit.xml is a lot of work.

@localheinz localheinz force-pushed the feature/same-directory branch 2 times, most recently from 505a77f to d8895da Compare September 20, 2023 11:18
@localheinz localheinz force-pushed the feature/same-directory branch 3 times, most recently from f7c3d85 to a30ba58 Compare January 2, 2024 11:14
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