mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4867 from tractorcow/pulls/3/merge-bugs
BUG Workaround for issues in testing versioned
This commit is contained in:
commit
ea5f72c176
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user