@@ -622,7 +622,7 @@ public function testSetServerParameterInRequest()
622
622
$ this ->assertEquals ('' , $ client ->getServerParameter ('HTTP_HOST ' ));
623
623
$ this ->assertEquals ('Symfony2 BrowserKit ' , $ client ->getServerParameter ('HTTP_USER_AGENT ' ));
624
624
625
- $ this ->assertEquals ('http ://www.example.com/https/www.example.com ' , $ client ->getRequest ()->getUri ());
625
+ $ this ->assertEquals ('https ://www.example.com/https/www.example.com ' , $ client ->getRequest ()->getUri ());
626
626
627
627
$ server = $ client ->getRequest ()->getServer ();
628
628
@@ -636,7 +636,24 @@ public function testSetServerParameterInRequest()
636
636
$ this ->assertEquals ('new-server-key-value ' , $ server ['NEW_SERVER_KEY ' ]);
637
637
638
638
$ this ->assertArrayHasKey ('HTTPS ' , $ server );
639
- $ this ->assertFalse ($ server ['HTTPS ' ]);
639
+ $ this ->assertTrue ($ server ['HTTPS ' ]);
640
+ }
641
+
642
+ public function testRequestWithRelativeUri ()
643
+ {
644
+ $ client = new TestClient ();
645
+
646
+ $ client ->request ('GET ' , '/ ' , array (), array (), array (
647
+ 'HTTP_HOST ' => 'testhost ' ,
648
+ 'HTTPS ' => true ,
649
+ ));
650
+ $ this ->assertEquals ('https://testhost/ ' , $ client ->getRequest ()->getUri ());
651
+
652
+ $ client ->request ('GET ' , 'https://www.example.com/ ' , array (), array (), array (
653
+ 'HTTP_HOST ' => 'testhost ' ,
654
+ 'HTTPS ' => false ,
655
+ ));
656
+ $ this ->assertEquals ('https://www.example.com/ ' , $ client ->getRequest ()->getUri ());
640
657
}
641
658
642
659
public function testInternalRequest ()
0 commit comments