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

Verify that sub namespaces in test match the expected location #167

Merged
merged 1 commit into from
Dec 30, 2021

Conversation

stronk7
Copy link
Member

@stronk7 stronk7 commented Dec 29, 2021

Added one more check to the unit tests naming sniff that now
verify, for testcase classes, that they are in the expected
subdirectory, following the general namespace rules for stuff
under the "classes" directory.

Note that we still aren't checking the correctness under "classes"
and, once that's implemented, surely some code here will be moved
to the general namespaces sniff (a note about that has been added
to code).

Also, note that we aren't still checking for level2 correctness, that
must be a valid API or "local", whenever that's possible it will be
checked.

So, this only validates that the location (sub-directories) of the
file matches the sub-namespaces of the class.

Covered with tests.

Added one more check to the unit tests naming sniff that now
verify, for testcase clases, that they are in the expected
subdirectory, following the general namespace rules for stuff
under the "classes" directory.

Note that we still aren't checking the correctness under "classes"
and, once that's implemented, surely some code here will be moved
to the general namespaces sniff (a note about that has been added
to code).

Also, note that we aren't still checking for level2 correctness, that
must be a valid API or "local", whenever that's possible it will be
checked.

So, this only validates that the location (sub-directories) of the
file matches the sub-namespaces of the class.

Covered with tests.
Copy link

@rezaies rezaies left a comment

Choose a reason for hiding this comment

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

Thank you.
I reviewed the changes and they make sense to me.

@stronk7
Copy link
Member Author

stronk7 commented Dec 30, 2021

Thanks, @rezaies ! Merging...

@stronk7 stronk7 merged commit e43d72c into moodlehq:master Dec 30, 2021
@stronk7 stronk7 deleted the verify_level2_test_namespace branch December 30, 2021 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants