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 test case methods to snake_case #169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JohnnyWalkerDigital
Copy link
Contributor

@JohnnyWalkerDigital JohnnyWalkerDigital commented May 19, 2023

Update naming convention to match official Laravel documentation. (These "best practices" are currently out-of-step with modern Laravel standards.)

Reasoning:

Update naming convention to match official Laravel documentation. These best practices are currently out-of-step with modern Laravel standards.

 * Laravel [officially changed to snake_case](laravel/laravel#5574) for test case methods in version 8.0. 
 * [Official Laravel documentation](https://laravel.com/docs/10.x/testing) uses snake_case. 
 * [Laracast videos](https://laracasts.com/series/phpunit-testing-in-laravel/episodes/2) use snake_case. 
 * The [previous discussion's](alexeymezenin#28) conclusions on this matter are no longer correct.
@JohnnyWalkerDigital
Copy link
Contributor Author

@alexeymezenin You seem to be engaging with this repo again... How about bringing it up to speed with current Laravel standards?

@Tpojka
Copy link

Tpojka commented Oct 24, 2023

Snake case should be used in tests regardless Laravel.

It differs from regular methods and force developer to pay extreme attention to those.
It differs from regular (app) methods that should be written following PSR standards.
Personally, I comply/obey 100% PSR standards which means I use camelCase for methods, but for testing methods I use snake_case.

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

3 participants