首页 > 代码库 > mock the facade

mock the facade

mock the facade:

Auth::shouldReceive(‘user‘)->andReturn($user = m::mock(‘StdClass‘));

$user->shouldReceive(‘posts‘)->once()->andReturn(array(‘posts‘));

 

mock the facade