This repository was archived by the owner on Jan 29, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 4040 "files" : [
4141 " src/functions/create_uploaded_file.php" ,
4242 " src/functions/marshal_headers_from_sapi.php" ,
43- " src/functions/marshal_protocol_version .php" ,
43+ " src/functions/marshal_protocol_version_from_sapi .php" ,
4444 " src/functions/marshal_uri_from_sapi.php" ,
4545 " src/functions/normalize_server.php" ,
4646 " src/functions/normalize_uploaded_files.php" ,
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public static function fromGlobals(
9898 $ cookies ?: $ _COOKIE ,
9999 $ query ?: $ _GET ,
100100 $ body ?: $ _POST ,
101- marshalProtocolVersion ($ server )
101+ marshalProtocolVersionFromSapi ($ server )
102102 );
103103 }
104104
Original file line number Diff line number Diff line change 1717 * @throws UnexpectedValueException if the $server['SERVER_PROTOCOL'] value is
1818 * malformed.
1919 */
20- function marshalProtocolVersion (array $ server )
20+ function marshalProtocolVersionFromSapi (array $ server )
2121{
2222 if (! isset ($ server ['SERVER_PROTOCOL ' ])) {
2323 return '1.1 ' ;
Original file line number Diff line number Diff line change 1717use Zend \Diactoros \Uri ;
1818
1919use function Zend \Diactoros \marshalHeadersFromSapi ;
20- use function Zend \Diactoros \marshalProtocolVersion ;
20+ use function Zend \Diactoros \marshalProtocolVersionFromSapi ;
2121use function Zend \Diactoros \marshalUriFromSapi ;
2222use function Zend \Diactoros \normalizeServer ;
2323use function Zend \Diactoros \normalizeUploadedFiles ;
@@ -562,12 +562,12 @@ public function testNormalizeFilesReturnsOnlyActualFilesWhenOriginalFilesContain
562562 public function testMarshalProtocolVersionRisesExceptionIfVersionIsNotRecognized ()
563563 {
564564 $ this ->expectException (UnexpectedValueException::class);
565- marshalProtocolVersion (['SERVER_PROTOCOL ' => 'dadsa/1.0 ' ]);
565+ marshalProtocolVersionFromSapi (['SERVER_PROTOCOL ' => 'dadsa/1.0 ' ]);
566566 }
567567
568568 public function testMarshalProtocolReturnsDefaultValueIfHeaderIsNotPresent ()
569569 {
570- $ version = marshalProtocolVersion ([]);
570+ $ version = marshalProtocolVersionFromSapi ([]);
571571 $ this ->assertSame ('1.1 ' , $ version );
572572 }
573573
@@ -576,7 +576,7 @@ public function testMarshalProtocolReturnsDefaultValueIfHeaderIsNotPresent()
576576 */
577577 public function testMarshalProtocolVersionReturnsHttpVersions ($ protocol , $ expected )
578578 {
579- $ version = marshalProtocolVersion (['SERVER_PROTOCOL ' => $ protocol ]);
579+ $ version = marshalProtocolVersionFromSapi (['SERVER_PROTOCOL ' => $ protocol ]);
580580 $ this ->assertSame ($ expected , $ version );
581581 }
582582
You can’t perform that action at this time.
0 commit comments