/** * Test continue if get expected exception * * @expectedException Symfony\Component\HttpKernel\Exception\NotFoundHttpException * @return void */ public function testUserNotFound() { $model = Mockery::mock('Suitcoda\\Model\\user'); $group = new UserController($model); $model->shouldReceive('findOrFailByUrlKey')->once()->andReturn(null); $group->destroy(1); }