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

Enable php_unit_internal_class rule #874

Merged
merged 1 commit into from
Feb 13, 2020
Merged

Conversation

ob-stripe
Copy link
Contributor

r? @remi-stripe @richardm-stripe

One more rule down. This enables the php_unit_internal_class rule, which requires that all test classes be final.

This didn't work initially because we had a base \Stripe\TestCase class that was also made final by the formatter and thus could no longer be extended by actual test classes.

I refactored it to be a trait instead of a base class (and renamed it to \Stripe\TestHelper), which is arguably better design (traits are better suited for code reuse than inheritance).

Copy link
Contributor

@remi-stripe remi-stripe left a comment

Choose a reason for hiding this comment

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

looks sane to me (disclaimer: did not carefully review as it's all tests)

@ob-stripe ob-stripe merged commit 87b4701 into master Feb 13, 2020
@ob-stripe ob-stripe deleted the ob-phpunit-internal branch February 13, 2020 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants