phpunit-documentation-english
phpunit-documentation-english copied to clipboard
Naming convention of data provider methods
As we can see in the data providers section the data provider method is named additionProvider. Since a method should start with a verb, it's confusing. So, to avoid a bad practice in projects because of this example, I'd suggest renaming it to provideAddition.
If agreed, I'm ready to create a pull request.
there are some concrete patterns how to name providers used by some, eg testFoo -> provideFooCases
maybe the docs should try to not only avoid "bad practice", but share "best practice" (whatever it would be)
I do not think that this should be covered in the documentation.