mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Check for object type before calling method, prevent fatal error in failing test.
This commit is contained in:
parent
b2dfa77056
commit
88b3901a69
@ -38,6 +38,7 @@ class ControllerTest extends FunctionalTest {
|
|||||||
|
|
||||||
public function testUndefinedActions() {
|
public function testUndefinedActions() {
|
||||||
$response = Director::test('ControllerTest_AccessUnsecuredSubController/undefinedaction');
|
$response = Director::test('ControllerTest_AccessUnsecuredSubController/undefinedaction');
|
||||||
|
$this->assertInstanceOf('SS_HTTPResponse', $response);
|
||||||
$this->assertEquals(404, $response->getStatusCode(), 'Undefined actions return a not found response.');
|
$this->assertEquals(404, $response->getStatusCode(), 'Undefined actions return a not found response.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user