PHPStorm String Manipulation plugin makes refactoring easy.
Convert PHPUnit test from: testUserCanCreateAccount() → test_user_can_create_account()
#php #phpunit
Back
It's based primarily on the PhpCsFixer default rule set (which includes that rule) and some small tweaks we like.
•
I also use php-cs-fixer or Rector for this (but to go the other way, from snake to camel). You can even restrict rules to particular folders if you want your `tests` directory to use a different style than `app`.
•
Sounds like a great style fixer! Are those rules shipped with php-cs-fixer / rector? Or is it a custom rule?
•
It's a built in rule for php-cs-fixer: cs.symfony.com/doc/rules/php_unit/php_unit_method_casing.html
Here's the config we use: github.com/NoCompromises/php-cs-fixer-config
It's based primarily on the PhpCsFixer default rule set (which includes that rule) and some small tweaks we like.