mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Marking Director::extract_request_headers() public because we can't unit test protected methods in PHP 5.2
This commit is contained in:
parent
b254b6ed3a
commit
2651a1ba81
@ -550,7 +550,7 @@ class Director {
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
protected static function extract_request_headers(array $server) {
|
||||
static function extract_request_headers(array $server) {
|
||||
$headers = array();
|
||||
|
||||
foreach($server as $key => $value) {
|
||||
|
@ -254,10 +254,7 @@ class DirectorTest extends SapphireTest {
|
||||
'Content-Length' => '10'
|
||||
);
|
||||
|
||||
$method = new ReflectionMethod('Director', 'extract_request_headers');
|
||||
$method->setAccessible(true);
|
||||
|
||||
$this->assertEquals($headers, $method->invoke(null, $request));
|
||||
$this->assertEquals($headers, Director::extract_request_headers($request));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user