@@ -85,31 +85,31 @@ public function testCookie()
8585 {
8686 // One cookie
8787 $ cookie = 'cookie1=value1 ' ;
88- $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie: ' . $ cookie ]);
88+ $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie ' => $ cookie ]);
8989 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
9090 $ this ->assertEquals ($ cookie , $ response ['body ' ]);
9191
9292 // Two cookiees
9393 $ cookie = 'cookie1=value1; cookie2=value2 ' ;
94- $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie: ' . $ cookie ]);
94+ $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie ' => $ cookie ]);
9595 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
9696 $ this ->assertEquals ($ cookie , $ response ['body ' ]);
9797
9898 // Two cookies without optional space
9999 $ cookie = 'cookie1=value1;cookie2=value2 ' ;
100- $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie: ' . $ cookie ]);
100+ $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie ' => $ cookie ]);
101101 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
102102 $ this ->assertEquals ($ cookie , $ response ['body ' ]);
103103
104104 // Cookie with "=" in value
105105 $ cookie = 'cookie1=value1=value2 ' ;
106- $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie: ' . $ cookie ]);
106+ $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie ' => $ cookie ]);
107107 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
108108 $ this ->assertEquals ($ cookie , $ response ['body ' ]);
109109
110110 // Case sensitivity for cookie names
111111 $ cookie = 'cookie1=v1; Cookie1=v2 ' ;
112- $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie: ' . $ cookie ]);
112+ $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie ' => $ cookie ]);
113113 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
114114 $ this ->assertEquals ($ cookie , $ response ['body ' ]);
115115 }
0 commit comments