# Unit Testing with phpunit

**URL:** <https://discourse.slimframework.com/t/unit-testing-with-phpunit/376>\
**Category:** Questions\
**Created:** [June 7, 2016, 12:44am UTC](https://discourse.slimframework.com/t/unit-testing-with-phpunit/376 "2016-06-07T00:44:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![roliver3](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/roliver3/32/124_2.png) [@roliver3](https://discourse.slimframework.com/u/roliver3)\
**Post date:** [June 7, 2016, 12:44am UTC](https://discourse.slimframework.com/t/unit-testing-with-phpunit/376/1 "2016-06-07T00:44:39Z")

</div>

I’m having a hard time understanding how to write unit tests for my controllers in slim. I came across this project [slim-test-helpers](https://github.com/there4/slim-test-helpers). But it looks like it is built for slim 2.6. Has anyone tried it with version 3? Also wondering if there was a beginner how-to on the subject of unit testing with slim

thanks

---

<div class="post-metadata">

**Author:** ![akrabat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/akrabat/32/9_2.png) [@akrabat](https://discourse.slimframework.com/u/akrabat)\
**Post date:** [June 7, 2016, 6:23am UTC](https://discourse.slimframework.com/t/unit-testing-with-phpunit/376/2 "2016-06-07T06:23:42Z")

</div>

I wrote a little about unit testing here: [https://akrabat.com/using-testing-eloquent-in-slim-framework/](https://akrabat.com/using-testing-eloquent-in-slim-framework/)
