@@ -42,8 +42,11 @@ public function testShouldInterceptCallWhenEnabled()
4242
4343 public  function  testShouldHandleSOAPVersion11 ()
4444 {
45-  $ expectedHeader'text/xml; charset=utf-8; action="http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP" ' ;
46-  $ this soapHook ->enable ($ this getHeaderCheckCallback ($ expectedHeader
45+  $ expectedHeadersarray (
46+  'Content-Type '  => 'text/xml; charset=utf-8; ' ,
47+  'SOAPAction '  => 'http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP ' ,
48+  );
49+  $ this soapHook ->enable ($ this getHeadersCheckCallback ($ expectedHeaders
4750
4851 $ clientnew  \SoapClient (
4952 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL ' ,
@@ -55,8 +58,11 @@ public function testShouldHandleSOAPVersion11()
5558
5659 public  function  testShouldHandleSOAPVersion12 ()
5760 {
58-  $ expectedHeader'application/soap+xml; charset=utf-8; action="http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP" ' ;
59-  $ this soapHook ->enable ($ this getHeaderCheckCallback ($ expectedHeader
61+  $ expectedHeadersarray (
62+  'Content-Type '  => 'application/soap+xml; charset=utf-8; action="http://ws.cdyne.com/WeatherWS/GetCityWeatherByZIP" ' ,
63+  );
64+ 
65+  $ this soapHook ->enable ($ this getHeadersCheckCallback ($ expectedHeaders
6066
6167 $ clientnew  \SoapClient (
6268 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL ' ,
@@ -78,14 +84,16 @@ protected function getContentCheckCallback()
7884 }
7985
8086 /** 
81-  * @param string $expectedHeader  
87+  * @param array $expectedHeaders  
8288 * @return \callable 
8389 */ 
84-  protected  function  getHeaderCheckCallback ( $ expectedHeader 
90+  protected  function  getHeadersCheckCallback ( array   $ expectedHeaders 
8591 {
8692 $ test$ this 
87-  return  function  (Request $ requestuse  ($ test$ expectedHeader
88-  $ testassertEquals ($ expectedHeader$ requestgetHeader ('Content-Type ' ));
93+  return  function  (Request $ requestuse  ($ test$ expectedHeaders
94+  foreach  ($ expectedHeadersas  $ expectedHeaderName$ expectedHeader
95+  $ testassertEquals ($ expectedHeader$ requestgetHeader ($ expectedHeaderName
96+  }
8997 return  new  Response (200 , array (), '' );
9098 };
9199 }
0 commit comments