@@ -17,68 +17,6 @@ public function setUpMessageFactory()
1717 $ this ->messageFactory = new MessageFactory ();
1818 }
1919
20- public function testUriSimple ()
21- {
22- $ uri = $ this ->messageFactory ->uri ('http://www.lueck.tv/ ' );
23-
24- $ this ->assertEquals ('http ' , $ uri ->getScheme ());
25- $ this ->assertEquals ('www.lueck.tv ' , $ uri ->getHost ());
26- $ this ->assertEquals ('/ ' , $ uri ->getPath ());
27-
28- $ this ->assertEquals (null , $ uri ->getPort ());
29- $ this ->assertEquals ('' , $ uri ->getQuery ());
30- }
31-
32- public function testUriComplete ()
33- {
34- $ uri = $ this ->messageFactory ->uri ('https://example.com:8080/?just=testing ' );
35-
36- $ this ->assertEquals ('https ' , $ uri ->getScheme ());
37- $ this ->assertEquals ('example.com ' , $ uri ->getHost ());
38- $ this ->assertEquals (8080 , $ uri ->getPort ());
39- $ this ->assertEquals ('/ ' , $ uri ->getPath ());
40- $ this ->assertEquals ('just=testing ' , $ uri ->getQuery ());
41- }
42-
43- public function testPlaceholdersInUriWillBeEscaped ()
44- {
45- $ uri = $ this ->messageFactory ->uri ('http://example.com/{version} ' );
46-
47- $ this ->assertEquals ('/%7Bversion%7D ' , $ uri ->getPath ());
48- }
49-
50- public function testEscapedPlaceholdersInUriWillStayEscaped ()
51- {
52- $ uri = $ this ->messageFactory ->uri ('http://example.com/%7Bversion%7D ' );
53-
54- $ this ->assertEquals ('/%7Bversion%7D ' , $ uri ->getPath ());
55- }
56-
57- public function testResolveRelative ()
58- {
59- $ base = $ this ->messageFactory ->uri ('http://example.com/base/ ' );
60-
61- $ this ->assertEquals ('http://example.com/base/ ' , $ this ->messageFactory ->uriRelative ($ base , '' ));
62- $ this ->assertEquals ('http://example.com/ ' , $ this ->messageFactory ->uriRelative ($ base , '/ ' ));
63-
64- $ this ->assertEquals ('http://example.com/base/a ' , $ this ->messageFactory ->uriRelative ($ base , 'a ' ));
65- $ this ->assertEquals ('http://example.com/a ' , $ this ->messageFactory ->uriRelative ($ base , '../a ' ));
66- }
67-
68- public function testResolveAbsolute ()
69- {
70- $ base = $ this ->messageFactory ->uri ('http://example.org/ ' );
71-
72- $ this ->assertEquals ('http://www.example.com/ ' , $ this ->messageFactory ->uriRelative ($ base , 'http://www.example.com/ ' ));
73- }
74-
75- public function testResolveUri ()
76- {
77- $ base = $ this ->messageFactory ->uri ('http://example.org/ ' );
78-
79- $ this ->assertEquals ('http://www.example.com/ ' , $ this ->messageFactory ->uriRelative ($ base , $ this ->messageFactory ->uri ('http://www.example.com/ ' )));
80- }
81-
8220 public function testBodyString ()
8321 {
8422 $ body = $ this ->messageFactory ->body ('hi ' );
0 commit comments