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

Add rule that enforces PHPUnit naming conventions #215

Closed
wants to merge 4 commits into from

Conversation

cs278
Copy link

@cs278 cs278 commented Nov 27, 2024

@cs278 cs278 force-pushed the class-naming-rule branch from 918a22f to dbfe30d Compare November 27, 2024 00:18
Comment on lines +66 to +71
if (!$class->isFinal()) {
$errors[] = RuleErrorBuilder::message(sprintf(
'Concrete test class, \'%s\', should be declared final.',
$class->getName(),
))->identifier('phpunit.naming')->build();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure this "isFinal" thing is something which should be mixed with a "general naming rule".

whether tests should be final or not is a pretty opinionated decision IMO

@ondrejmirtes
Copy link
Member

Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it.

I've outlined why in this comment: #214 (comment)

@cs278 cs278 deleted the class-naming-rule branch December 16, 2024 18:29
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.

3 participants