1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Webapi\Controller;
class SoapTest extends \PHPUnit\Framework\TestCase
{
/**
* @var \Magento\Webapi\Controller\Soap
*/
protected $soapController;
/**
* @var \Magento\Framework\ObjectManagerInterface
*/
protected $objectManager;
protected function setUp()
{
$this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
$this->soapController = $this->objectManager->get(\Magento\Webapi\Controller\Soap::class);
}
/*
* Get the public wsdl with anonymous credentials
*/
public function testDispatchWsdlRequest()
{
$request = $this->objectManager->get(\Magento\Framework\Webapi\Request::class);
$request->setParam(\Magento\Webapi\Model\Soap\Server::REQUEST_PARAM_LIST_WSDL, true);
$response = $this->soapController->dispatch($request);
$decoded_wsdl = json_decode($response->getContent(), true);
$this->assertArrayHasKey("customerAccountManagementV1", $decoded_wsdl);
$this->assertArrayHasKey("integrationAdminTokenServiceV1", $decoded_wsdl);
}
}