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

change phpunit to pest testing framework #423

Merged
merged 4 commits into from
Oct 22, 2022
Merged

Conversation

uthadehikaru
Copy link
Contributor

Hi,

i got the challenge from @freekmurze tweet about converting spatie package unit test from phpunit to pest.

i'm new in unit testing and pest is really impressive me with the simplicity. i tried my best and the test is passed all without any change on scenario.

maybe i will try to scan all spatie package to change unit test from phpunit to pest. :D

thanks for the chance

Copy link
Member

@freekmurze freekmurze 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, could you also convert all assertions to the expectations?
https://pestphp.com/docs/expectations

@freekmurze
Copy link
Member

Also add this section to composer.json to make the tests run on GitHub actions.

@uthadehikaru
Copy link
Contributor Author

bug fix when run composer on github action

@uthadehikaru
Copy link
Contributor Author

i changed assertions to the expectations. i'm wondering that expectations on pestphp just like Str helper as advance php string functions on laravel.

@freekmurze freekmurze merged commit a94d3ec into spatie:main Oct 22, 2022
@freekmurze
Copy link
Member

Thanks!

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.

None yet

2 participants