Create a mock object from WSDL

Code
<?php

class WsdlTest extends PHPUnit_Framework_TestCase
{
    public function 
testWsdlMock()
    {
        
// http://www.webservicex.com/globalweather.asmx?WSDL
        
$wsdl __DIR__.'/resources/weather.xml';

        
$mock $this->getMockFromWsdl($wsdl'Webservice');
    
        
$result = [
            
'GetCitiesByCountryResult' => '<NewDataSet>
<Table>
<Country>Italy</Country>
<City>Amendola</City>
</Table>
</NewDataSet>'
,
        ];
    
        
$mock->expects($this->once())
            ->
method('GetCitiesByCountry')
            ->
will($this->returnValue($result));
        
        
self::assertInstanceOf(SoapClient::class, $mock);
        
self::assertSame($result$mock->GetCitiesByCountry([
            
'CountryName' => 'Italy',
        ]));
    }
}
Result
Time: 233 ms, Memory: 10.00MB

OK (1 test, 0 assertions)
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6