Skip to content

Commit 9bad9fb

Browse files
committed
Fixing broken SOAP integration test
1 parent dc33b5c commit 9bad9fb

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

tests/integration/soap/src/VCR/Example/ExampleSoapClient.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
*/
1010
class ExampleSoapClient
1111
{
12-
const EXAMPLE_WSDL = 'http://www.webservicex.net/ConvertTemperature.asmx?WSDL';
12+
const EXAMPLE_WSDL = 'http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL';
1313

14-
public function call($zip = '10')
14+
public function call($number = 12)
1515
{
1616
$client = new \SoapClient(self::EXAMPLE_WSDL, array('soap_version' => SOAP_1_2));
17-
$response = $client->ConvertTemp(array('Temperature' => $zip, 'FromUnit' => 'degreeCelsius', 'ToUnit' => 'degreeFahrenheit'));
17+
$response = $client->NumberToWords(array('ubiNum' => $number));
1818

19-
return (int) $response->ConvertTempResult;
19+
return trim((string) $response->NumberToWordsResult);
2020
}
2121
}

tests/integration/soap/test/VCR/Example/ExampleSoapClientTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ public function setUp()
2121
public function testCallDirectly()
2222
{
2323
$actual = $this->callSoap();
24-
$this->assertInternalType('integer', $actual);
24+
$this->assertInternalType('string', $actual);
25+
$this->assertEquals('twelve', $actual);
2526
}
2627

2728
public function testCallIntercepted()
2829
{
2930
$actual = $this->callSoapIntercepted();
30-
$this->assertInternalType('integer', $actual);
31+
$this->assertInternalType('string', $actual);
32+
$this->assertEquals('twelve', $actual);
3133
}
3234

3335
public function testCallDirectlyEqualsIntercepted()
@@ -38,7 +40,7 @@ public function testCallDirectlyEqualsIntercepted()
3840
protected function callSoap()
3941
{
4042
$soapClient = new ExampleSoapClient();
41-
return $soapClient->call('10013'); // somewhere in New York
43+
return $soapClient->call(12);
4244
}
4345

4446
protected function callSoapIntercepted()

0 commit comments

Comments
 (0)