mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Removed whitespace from DirectorTest
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@95881 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f2d264ce3a
commit
d8b67c4a2e
@ -123,7 +123,6 @@ class DirectorTest extends SapphireTest {
|
||||
}
|
||||
|
||||
public function testResetGlobalsAfterTestRequest() {
|
||||
|
||||
$_GET = array('somekey' => 'getvalue');
|
||||
$_POST = array('somekey' => 'postvalue');
|
||||
$_COOKIE = array('somekey' => 'cookievalue');
|
||||
@ -136,21 +135,15 @@ class DirectorTest extends SapphireTest {
|
||||
}
|
||||
|
||||
public function testTestRequestCarriesGlobals() {
|
||||
|
||||
$fixture = array('somekey' => 'sometestvalue');
|
||||
|
||||
foreach(array('get', 'post') as $method) {
|
||||
|
||||
foreach(array('return%sValue', 'returnRequestValue', 'returnCookieValue') as $testfunction) {
|
||||
|
||||
$url = 'DirectorTestRequest_Controller/' . sprintf($testfunction, ucfirst($method)) . '?' . http_build_query($fixture);
|
||||
$getresponse = Director::test($url, $fixture, null, strtoupper($method), null, null, $fixture);
|
||||
|
||||
$this->assertType('SS_HTTPResponse', $getresponse, 'Director::test() returns SS_HTTPResponse');
|
||||
$this->assertEquals($fixture['somekey'], $getresponse->getBody(), 'Director::test() ' . $testfunction);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user