gothinkster / laravel-realworld-example-app

Exemplary real world backend API built with Laravel

Home Page:https://realworld.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding tests

sandeesh opened this issue · comments

I have started adding tests to cover all api endpoints. Feel free to create a PR to make a contribution.

I started to implement some tests but what do you think if you have the same structure of postman test ?

Articles/AllArticlesTest.php for Articles -> All articles request
Articles/ArticlesByAuthorTest.php for Articles -> Articles by author request
...

@MPur thanks for the interest :) Since nobody were willing to help out, i've already completed 90% of the tests and pushed it. You can check them here https://github.com/gothinkster/laravel-realworld-example-app/tree/master/tests/Feature/Api

Only the article tests are pending which i was going to add tomorrow. If you would like to then you can go ahead and finish it. I've kept all the tests related to a particular route in a single file and try to get as many cases possible covered.

I felt the current way more readable and easier to understand. If needed be we can segregate the tests to separate folders and files like you've mentioned after completing all the tests.

I've completed adding all the tests myself. Closing this.