Mitchell McKenna - tagged with unit-tests http://mitchmckenna.com/feed en-us http://blogs.law.harvard.edu/tech/rss LifePress mitchellmckenna@gmail.com Better Testing in Laravel - Jeffrey Way http://mitchmckenna.com/post/12641/laracon-day-1-talk-2-jeffrey-way

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.
]]>
Fri, 22 Mar 2013 02:49:00 -0400 http://mitchmckenna.com/post/12641/laracon-day-1-talk-2-jeffrey-way/laracon-day-1-talk-2-jeffrey-way