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

TestClassSuffixNameRule #609

Merged
merged 9 commits into from
Jan 31, 2024
Merged

TestClassSuffixNameRule #609

merged 9 commits into from
Jan 31, 2024

Conversation

Boegie
Copy link
Contributor

@Boegie Boegie commented Oct 1, 2023

Trying to implement #608

@Boegie
Copy link
Contributor Author

Boegie commented Oct 1, 2023

Let's wait until somebody comments on https://www.drupal.org/project/drupal/issues/3268489#comment-15252653 about the abstract-ness of *TestBase classes.

@Boegie
Copy link
Contributor Author

Boegie commented Oct 2, 2023

Verdict is in:

The base classes should always be abstract yes, not sure whether it's documented but it's what should happen.
catch in https://www.drupal.org/project/drupal/issues/3268489#comment-15252749

For me the rule works as expected and is ready for review.

@Boegie
Copy link
Contributor Author

Boegie commented Oct 17, 2023

Let's see if we can do something more here by also checking for namespaces, and most importantly for tests being picked up by the test runner directory naming.
See https://www.drupal.org/project/drupal/issues/3394186#comment-15274178

@mglaman
Copy link
Owner

mglaman commented Oct 17, 2023

@Boegie I'll defer to your judgement if the baseline failures look OK. When you say it's good, I'll merge

@Boegie
Copy link
Contributor Author

Boegie commented Oct 18, 2023

Ohh, the pressure... ;)

Thanks @mglaman, I have something cooking locally that has three rules for test classes, one for the class name (this one), one for the namespace and one for the file location.

Since they both use a lot of the same code it makes sense to me to create a base class for this, thus trying to create one PR to rule them all.

Shouldn't be long...
#FamousLastWords

@mglaman mglaman changed the title TestClassNameRule TestClassSuffixNameRule Jan 31, 2024
@mglaman mglaman merged commit 20d2715 into mglaman:main Jan 31, 2024
18 checks passed
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