Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
WsdlFactoryTest.php
Go to the documentation of this file.
1 <?php
9 
10 class WsdlFactoryTest extends \PHPUnit\Framework\TestCase
11 {
14 
16  protected $_soapWsdlFactory;
17 
18  protected function setUp()
19  {
20  $this->_objectManagerMock = $this->createMock(\Magento\Framework\ObjectManagerInterface::class);
21  $this->_soapWsdlFactory = new \Magento\Webapi\Model\Soap\WsdlFactory($this->_objectManagerMock);
22  parent::setUp();
23  }
24 
25  protected function tearDown()
26  {
27  unset($this->_objectManagerMock);
28  unset($this->_soapWsdlFactory);
29  parent::tearDown();
30  }
31 
32  public function testCreate()
33  {
34  $wsdlName = 'wsdlName';
35  $endpointUrl = 'endpointUrl';
36  $this->_objectManagerMock->expects(
37  $this->once()
38  )->method(
39  'create'
40  )->with(
41  \Magento\Webapi\Model\Soap\Wsdl::class,
42  ['name' => $wsdlName, 'uri' => $endpointUrl]
43  );
44  $this->_soapWsdlFactory->create($wsdlName, $endpointUrl);
45  }
46 }