BUG Workaround for issues in testing version

This commit is contained in:
Damian Mooyman 2015-12-22 17:45:02 +13:00
parent 19b10044ec
commit fce82519bd
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ class VersionedRequestFilter implements RequestFilter {
$dummyController->popCurrent();
// Prevent output in testing
if(class_exists('SapphireTest', false) && SapphireTest::is_running_test()) {
return false;
throw new SS_HTTPResponse_Exception($response);
}
$response->output();
die;

View File

@ -654,7 +654,7 @@ class VersionedTest extends SapphireTest {
* Test that stage parameter is blocked by non-administrative users
*/
public function testReadingModeSecurity() {
$this->setExpectedException('SS_HTTPResponse_Exception', 'Invalid request');
$this->setExpectedException('SS_HTTPResponse_Exception');
$session = Injector::inst()->create('Session', array());
$result = Director::test('/?stage=Stage', null, $session);
}