Tag: Laravel

Be Careful $with Laravel

Following a little surprise on a Laravel project I was developing, I figured best to write a short post about it. Make sure to be very careful when you use the $with property in your models. Whilst this can be a helpful property – it allows the model to always eager load a relationship or […]

Read full post

PHPSpec – Defining custom inline matchers

At first I didn’t get PHPSpec’s “inline matchers” but have since discovered how to use them for matching custom conditions in your tests.

It’s amazing how far a few simple examples will take you, and thanks to kind-hearted folk on the net, I’ve had my eyes opened and hopefully can provide some useful examples for other people.

Read full post

Getting PHPSpec to work with Laravel

I’ve recently started using PHPSpec to drive my testing efforts in a new Laravel project. The behaviour-driven approach makes a lot of sense to me but I am finding it a little difficult to master.

This post provides a fix if you find PHPSpec throwing Class not found errors after running your test suite on the command line.

Read full post