@@ -127,31 +127,31 @@ public function testCookie()
127127 {
128128 // One cookie
129129 $ cookie = 'cookie1=value1 ' ;
130- $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie: ' . $ cookie ]);
130+ $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie ' => $ cookie ]);
131131 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
132132 $ this ->assertEquals ($ cookie , $ response ['body ' ]);
133133
134134 // Two cookiees
135135 $ cookie = 'cookie1=value1; cookie2=value2 ' ;
136- $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie: ' . $ cookie ]);
136+ $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie ' => $ cookie ]);
137137 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
138138 $ this ->assertEquals ($ cookie , $ response ['body ' ]);
139139
140140 // Two cookies without optional space
141141 $ cookie = 'cookie1=value1;cookie2=value2 ' ;
142- $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie: ' . $ cookie ]);
142+ $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie ' => $ cookie ]);
143143 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
144144 $ this ->assertEquals ($ cookie , $ response ['body ' ]);
145145
146146 // Cookie with "=" in value
147147 $ cookie = 'cookie1=value1=value2 ' ;
148- $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie: ' . $ cookie ]);
148+ $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie ' => $ cookie ]);
149149 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
150150 $ this ->assertEquals ($ cookie , $ response ['body ' ]);
151151
152152 // Case sensitivity for cookie names
153153 $ cookie = 'cookie1=v1; Cookie1=v2 ' ;
154- $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie: ' . $ cookie ]);
154+ $ response = $ this ->client ->call (Client::METHOD_GET , '/cookies ' , [ 'Cookie ' => $ cookie ]);
155155 $ this ->assertEquals (200 , $ response ['headers ' ]['status-code ' ]);
156156 $ this ->assertEquals ($ cookie , $ response ['body ' ]);
157157 }
0 commit comments