library/ServiceCaller.php
public function callService($serviceName, $shopId = null)
    {
        $testConfig = $this->getTestConfig();
        if (!is_null($shopId) && $testConfig->getShopEdition() == 'EE') {
            $this->setParameter('shp', $shopId);
        } elseif ($testConfig->isSubShop()) {
            $this->setParameter('shp', $testConfig->getShopId());
        }

        if ($testConfig->getRemoteDirectory()) {
            $response = $this->callRemoteService($serviceName);
        } else {
            $this->callLocalService(ChangeExceptionLogRights::class);

            $response = $this->callLocalService($serviceName);
        }

        $this->parameters = array();

        return $response;
    }
public function callService($serviceName, $shopId = null)
    {
        $testConfig = $this->getTestConfig();
        if (!is_null($shopId) && $testConfig->getShopEdition() == 'EE') {
            $this->setParameter('shp', $shopId);
        } elseif ($testConfig->isSubShop()) {
            $this->setParameter('shp', $testConfig->getShopId());
        }

        if ($testConfig->getRemoteDirectory()) {
            $response = $this->callRemoteService($serviceName);
        } else {
            $this->callLocalService(ChangeExceptionLogRights::class);

            $response = $this->callLocalService($serviceName);
        }

        $this->parameters = array();

        return $response;
    }
public function callService ( $ serviceName , $ shopId = null ) { $ testConfig = $ this -> getTestConfig ( ) ; if ( ! is_null ( $ shopId ) && $ testConfig -> getShopEdition ( ) == 'EE' ) { $ this -> setParameter ( 'shp' , $ shopId ) ; } elseif ( $ testConfig -> isSubShop ( ) ) { $ this -> setParameter ( 'shp' , $ testConfig -> getShopId ( ) ) ; } if ( $ testConfig -> getRemoteDirectory ( ) ) { $ response = $ this -> callRemoteService ( $ serviceName ) ; } else { $ this -> callLocalService ( ChangeExceptionLogRights :: class ) ; $ response = $ this -> callLocalService ( $ serviceName ) ; } $ this -> parameters = array ( ) ; return $ response ; }
Call shop service to execute code in shop.

@param string $serviceName
@param string $shopId

@example call to update information to database.

@throws \Exception

@return string $sResult
Call shop service to execute code in shop .