Created
August 23, 2014 09:53
-
-
Save ivanhoe011/396e77a5c1e4db50c081 to your computer and use it in GitHub Desktop.
mocking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$mock = Mockery::mock('SceneMongo'); | |
$mock->shouldReceive('where')->with('visible', 1)->once()->andReturn($mock); | |
$mock->shouldReceive('where')->with('published_at', '<=', Mockery::type('int'))->once()->andReturn($mock); | |
$mock->shouldReceive('take')->with($limit)->once()->andReturn($mock); | |
$mock->shouldReceive('orderBy')->with('rating', 'DESC')->once()->andReturn($mock); | |
$mock->shouldReceive('get')->once()->andReturn($collection); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment