diff --git a/control/VersionedRequestFilter.php b/control/VersionedRequestFilter.php index e7d6a3863..ea7b277e5 100644 --- a/control/VersionedRequestFilter.php +++ b/control/VersionedRequestFilter.php @@ -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; diff --git a/tests/model/VersionedTest.php b/tests/model/VersionedTest.php index 5795507c6..13851eba4 100644 --- a/tests/model/VersionedTest.php +++ b/tests/model/VersionedTest.php @@ -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); }