Better Testing in Laravel - Jeffrey Way
March 22 2013, 2:49am
Jeffery Way, editor at Nettuts, is somewhat of a Laravel evangelist. In his talk at Laravel Conference 2013 he goes over how you can write more testable code, and how you can improve your unit tests.
- 5:40 - Intro to Laravel's handy generator Artisan to generate files, and a package he put together of even more handy generators, you can get it on github: Laravel-4-Generators.
- 10:55 - Using Dependency Injection to write more testable code.
- 13:30 - Smart type hinting with Laravel's IOC Containers.
- 18:45 - Intro to Interfaces using an example of injecting your database layer via an Interface implementation so your controller isn't bound to an ORM.
- 24:05 - Creating php unit tests.
- 28:40 - Using mock objects and the Mockery framework.
- 33:50 - Making tests more readable. I found this interesting; creating common assertions to simplify writing tests, so your more likely to write them in the future.
- Tags:
- Programming
- php
- testing
- laravel
- unit tests