|
17 | 17 |
|
18 | 18 | class RequestTest extends \PHPUnit_Framework_TestCase
|
19 | 19 | {
|
20 |
| - public function deprecationErrorHandler($errorNumber, $message, $file, $line, $context) |
21 |
| - { |
22 |
| - if ($errorNumber & E_USER_DEPRECATED) { |
23 |
| - return true; |
24 |
| - } |
25 |
| - |
26 |
| - return \PHPUnit_Util_ErrorHandler::handleError($errorNumber, $message, $file, $line); |
27 |
| - } |
28 |
| - |
29 | 20 | /**
|
30 | 21 | * @covers Symfony\Component\HttpFoundation\Request::__construct
|
31 | 22 | */
|
@@ -908,8 +899,6 @@ public function testOverrideGlobals()
|
908 | 899 |
|
909 | 900 | // restore initial $_SERVER array
|
910 | 901 | $_SERVER = $server;
|
911 |
| - |
912 |
| - restore_error_handler(); |
913 | 902 | }
|
914 | 903 |
|
915 | 904 | public function testGetScriptName()
|
@@ -1158,32 +1147,6 @@ public function testToString()
|
1158 | 1147 | $this->assertContains('Accept-Language: zh, en-us; q=0.8, en; q=0.6', $request->__toString());
|
1159 | 1148 | }
|
1160 | 1149 |
|
1161 |
| - /** |
1162 |
| - * @dataProvider splitHttpAcceptHeaderData |
1163 |
| - */ |
1164 |
| - public function testSplitHttpAcceptHeader($acceptHeader, $expected) |
1165 |
| - { |
1166 |
| - $request = new Request(); |
1167 |
| - |
1168 |
| - set_error_handler(array($this, "deprecationErrorHandler")); |
1169 |
| - $this->assertEquals($expected, $request->splitHttpAcceptHeader($acceptHeader)); |
1170 |
| - restore_error_handler(); |
1171 |
| - } |
1172 |
| - |
1173 |
| - public function splitHttpAcceptHeaderData() |
1174 |
| - { |
1175 |
| - return array( |
1176 |
| - array(null, array()), |
1177 |
| - array('text/html;q=0.8', array('text/html' => 0.8)), |
1178 |
| - array('text/html;foo=bar;q=0.8 ', array('text/html;foo=bar' => 0.8)), |
1179 |
| - array('text/html;charset=utf-8; q=0.8', array('text/html;charset=utf-8' => 0.8)), |
1180 |
| - array('text/html,application/xml;q=0.9,*/*;charset=utf-8; q=0.8', array('text/html' => 1.0, 'application/xml' => 0.9, '*/*;charset=utf-8' => 0.8)), |
1181 |
| - array('text/html,application/xhtml+xml;q=0.9,*/*;q=0.8; foo=bar', array('text/html' => 1.0, 'application/xhtml+xml' => 0.9, '*/*;foo=bar' => 0.8)), |
1182 |
| - array('text/html,application/xhtml+xml;charset=utf-8;q=0.9; foo=bar,*/*', array('text/html' => 1.0, '*/*' => 1.0, 'application/xhtml+xml;charset=utf-8;foo=bar' => 0.9)), |
1183 |
| - array('text/html,application/xhtml+xml', array('text/html' => 1.0, 'application/xhtml+xml' => 1.0)), |
1184 |
| - ); |
1185 |
| - } |
1186 |
| - |
1187 | 1150 | public function testIsMethod()
|
1188 | 1151 | {
|
1189 | 1152 | $request = new Request();
|
|
0 commit comments