Merge pull request #4867 from tractorcow/pulls/3/merge-bugs

BUG Workaround for issues in testing versioned
This commit is contained in:
Sam Minnée 2015-12-22 18:40:16 +13:00
commit ea5f72c176
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);
}