mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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() {
|
public function testResetGlobalsAfterTestRequest() {
|
||||||
|
|
||||||
$_GET = array('somekey' => 'getvalue');
|
$_GET = array('somekey' => 'getvalue');
|
||||||
$_POST = array('somekey' => 'postvalue');
|
$_POST = array('somekey' => 'postvalue');
|
||||||
$_COOKIE = array('somekey' => 'cookievalue');
|
$_COOKIE = array('somekey' => 'cookievalue');
|
||||||
@ -136,21 +135,15 @@ class DirectorTest extends SapphireTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function testTestRequestCarriesGlobals() {
|
public function testTestRequestCarriesGlobals() {
|
||||||
|
|
||||||
$fixture = array('somekey' => 'sometestvalue');
|
$fixture = array('somekey' => 'sometestvalue');
|
||||||
|
|
||||||
foreach(array('get', 'post') as $method) {
|
foreach(array('get', 'post') as $method) {
|
||||||
|
|
||||||
foreach(array('return%sValue', 'returnRequestValue', 'returnCookieValue') as $testfunction) {
|
foreach(array('return%sValue', 'returnRequestValue', 'returnCookieValue') as $testfunction) {
|
||||||
|
|
||||||
$url = 'DirectorTestRequest_Controller/' . sprintf($testfunction, ucfirst($method)) . '?' . http_build_query($fixture);
|
$url = 'DirectorTestRequest_Controller/' . sprintf($testfunction, ucfirst($method)) . '?' . http_build_query($fixture);
|
||||||
$getresponse = Director::test($url, $fixture, null, strtoupper($method), null, null, $fixture);
|
$getresponse = Director::test($url, $fixture, null, strtoupper($method), null, null, $fixture);
|
||||||
|
|
||||||
$this->assertType('SS_HTTPResponse', $getresponse, 'Director::test() returns SS_HTTPResponse');
|
$this->assertType('SS_HTTPResponse', $getresponse, 'Director::test() returns SS_HTTPResponse');
|
||||||
$this->assertEquals($fixture['somekey'], $getresponse->getBody(), 'Director::test() ' . $testfunction);
|
$this->assertEquals($fixture['somekey'], $getresponse->getBody(), 'Director::test() ' . $testfunction);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user