Skip to content

Instantly share code, notes, and snippets.

@vatson
Created October 24, 2011 20:48
Show Gist options
  • Save vatson/1310210 to your computer and use it in GitHub Desktop.
Save vatson/1310210 to your computer and use it in GitHub Desktop.
Mockery rocks!
<?php
$this->customer = Mockery::finalMock('\\Customer');
$this->customer->shouldReceive('__get')->with('email')->once()->andReturn($email_address);
$this->customer->shouldReceive('__get')->with('first_name')->once()->andReturn($first_name);
$this->customer->shouldReceive('__get')->with('last_name')->once()->andReturn($sur_name);
$this->customer->shouldReceive('__get')->with('phone_number')->once()->andReturn($phone_number);
$this->customer->shouldReceive('__get')->with('cell_phone_number')->once()->andReturn($cell_phone_number);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment