Skip to content

Commit cba6394

Browse files
author
Robert He
committed
MAGETWO-66882: Allowing Web API listing to be public - 2.2
- added integration test
1 parent bc447bf commit cba6394

File tree

1 file changed

+39
-0
lines changed
  • dev/tests/integration/testsuite/Magento/Webapi/Controller

1 file changed

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

0 commit comments

Comments
 (0)