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

DRY tests with Kirby\TestCase #6124

Merged
merged 10 commits into from
Jan 9, 2024
Merged

Conversation

distantnative
Copy link
Member

No description provided.

@distantnative distantnative added type: refactoring ♻️ Is about bad code; cleans up code type: tests 🧪 Is about missing tests; increases test coverage or improves tests labels Jan 5, 2024
@distantnative distantnative added this to the 4.1.0 milestone Jan 5, 2024
@distantnative distantnative self-assigned this Jan 5, 2024
Copy link
Member

@lukasbestle lukasbestle left a comment

Choose a reason for hiding this comment

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

Good idea. Can we replace all other uses of PHPUnit\Framework\TestCase with this as well to have the methods available throughout the system?

tests/TestCase.php Outdated Show resolved Hide resolved
@distantnative
Copy link
Member Author

@lukasbestle change it so that all test classes use Kirby\TestCase. Added assertIsPage in a few places, but I think it's too big to change all tests to use these methods all at once.

bastianallgeier
bastianallgeier previously approved these changes Jan 8, 2024
Copy link
Member

@bastianallgeier bastianallgeier left a comment

Choose a reason for hiding this comment

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

This is great. I'm really happy that we are finally start cleaning up the tests.

@bastianallgeier bastianallgeier merged commit fc9a8a2 into develop-minor Jan 9, 2024
14 checks passed
@bastianallgeier bastianallgeier deleted the refactor/global-testcase branch January 9, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: refactoring ♻️ Is about bad code; cleans up code type: tests 🧪 Is about missing tests; increases test coverage or improves tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants