MINOR Marking Director::extract_request_headers() public because we can't unit test protected methods in PHP 5.2

This commit is contained in:
Ingo Schommer 2011-09-19 16:01:33 +02:00
parent b254b6ed3a
commit 2651a1ba81
2 changed files with 2 additions and 5 deletions

View File

@ -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) {

View File

@ -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));
}
}