Create a mock object from WSDL

Code
<?php

use PHPUnit\Framework\TestCase;

class 
WsdlTest extends TestCase
{
    public function 
testWsdlMock() : void
    
{
        
// 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: 00:00.008, Memory: 4.00 MB

OK (1 test, 0 assertions)
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8