Adam Wathan posted another excellent article on testing on his blog. This time he talks about creating test doubles. Adam demonstrates that creating your own fake can result in a much more readable test than using mocks or spies.

You'll learn to create an InMemoryMailer like this:

public function test_new_users_are_sent_a_welcome_email()
    $mailer = new InMemoryMailer;

    $this->post('register', [
        'name' => 'John Doe',
        'email' => '[email protected]',
        'password' => 'secret',

    $this->assertTrue($mailer->hasMessageFor('[email protected]'));
    $this->assertTrue($mailer->hasMessageWithSubject('Welcome to my app!'));

That seems like a pretty readable test to me. Read (or view) the whole tutorial here: