gerardroche / sublime-phpunit

PHPUnit Sublime Text integration.
https://www.gerardroche.com
GNU General Public License v3.0
74 stars 11 forks source link

Showing no test to run. #79

Closed nhwaani closed 6 years ago

nhwaani commented 6 years ago

i am using sublime text 3 , and when i run the test file or complete test suite command, the test result shows no test found. @gerardroche @pryley

gerardroche commented 6 years ago

Hmm... methods in php are case-insensitive. I first thought this is a PHPUnitKit issue, but it looks like test methods names in PHPUnit are case-sensitive, although it doesn't explicitly say so in the manual:

The tests are public methods that are named test*.

Alternatively, you can use the @test annotation in a method's docblock to mark it as a test method.

nhwaani commented 6 years ago

Thanks man , yes i used now the @test in annotations, and now working file. It was my mistake, your repo is really cool brother. I want your suggestions on this, Say we are building a blog using TDD, and say we want to add new feature , " user can edit his post " how should i unit test the edit method in post controller, should i write a unit test for succes case , one when validation fails, one when authorization doesn't allow, etc.. each method inside my EditPostUnitTest file. or what are your suggestions, n what about acceptance testing