mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Workaround for issues in testing version
This commit is contained in:
parent
19b10044ec
commit
fce82519bd
@ -32,7 +32,7 @@ class VersionedRequestFilter implements RequestFilter {
|
|||||||
$dummyController->popCurrent();
|
$dummyController->popCurrent();
|
||||||
// Prevent output in testing
|
// Prevent output in testing
|
||||||
if(class_exists('SapphireTest', false) && SapphireTest::is_running_test()) {
|
if(class_exists('SapphireTest', false) && SapphireTest::is_running_test()) {
|
||||||
return false;
|
throw new SS_HTTPResponse_Exception($response);
|
||||||
}
|
}
|
||||||
$response->output();
|
$response->output();
|
||||||
die;
|
die;
|
||||||
|
@ -654,7 +654,7 @@ class VersionedTest extends SapphireTest {
|
|||||||
* Test that stage parameter is blocked by non-administrative users
|
* Test that stage parameter is blocked by non-administrative users
|
||||||
*/
|
*/
|
||||||
public function testReadingModeSecurity() {
|
public function testReadingModeSecurity() {
|
||||||
$this->setExpectedException('SS_HTTPResponse_Exception', 'Invalid request');
|
$this->setExpectedException('SS_HTTPResponse_Exception');
|
||||||
$session = Injector::inst()->create('Session', array());
|
$session = Injector::inst()->create('Session', array());
|
||||||
$result = Director::test('/?stage=Stage', null, $session);
|
$result = Director::test('/?stage=Stage', null, $session);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user