Add tests for changed controllers

This commit is contained in:
Dane Everitt 2018-07-04 19:20:33 -07:00
parent ec8e434375
commit 6c20ea9881
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 62 additions and 304 deletions

View file

@ -66,6 +66,19 @@ abstract class ControllerTestCase extends TestCase
}
}
/**
* Mocks a request input call.
*
* @param string $param
* @param mixed $return
*/
protected function mockRequestInput(string $param, $return = null)
{
$this->request->shouldReceive('input')->withArgs(function ($k) use ($param) {
return $k === $param;
})->andReturn($return);
}
/**
* Build and return a mocked controller instance to use for testing.
*