mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-10 10:23:46 +02:00
Add tests for changed controllers
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user