Example #1
0
 /**
  * Retrieve SOAP operation name from available service info.
  *
  * @param array $serviceInfo
  * @return string
  * @throws \LogicException
  */
 protected function _getSoapOperation($serviceInfo)
 {
     if (isset($serviceInfo['soap']['operation'])) {
         $soapOperation = $serviceInfo['soap']['operation'];
     } elseif (isset($serviceInfo['serviceInterface']) && isset($serviceInfo['method'])) {
         $soapOperation = $this->_soapConfig->getSoapOperation($serviceInfo['serviceInterface'], $serviceInfo['method']);
     } else {
         throw new \LogicException("SOAP operation cannot be identified.");
     }
     return $soapOperation;
 }
 public function testGetSoapOperation()
 {
     $expectedResult = 'customerAccountManagementV1Activate';
     $soapOperation = $this->_soapConfig->getSoapOperation('Magento\\Customer\\Api\\AccountManagementInterface', 'activate', 'V1');
     $this->assertEquals($expectedResult, $soapOperation);
 }
Example #3
0
 public function testGetSoapOperation()
 {
     $expectedResult = 'moduleFooV1SomeMethod';
     $soapOperation = $this->_soapConfig->getSoapOperation('Magento\\Framework\\Module\\Service\\FooV1Interface', 'someMethod');
     $this->assertEquals($expectedResult, $soapOperation);
 }