Behat\Testwork\Call\CallCenter::makeCall PHP Method

makeCall() public method

Handles call and its result using registered filters and handlers.
public makeCall ( Behat\Testwork\Call\Call $call ) : Behat\Testwork\Call\CallResult
$call Behat\Testwork\Call\Call
return Behat\Testwork\Call\CallResult
    public function makeCall(Call $call)
    {
        try {
            return $this->filterResult($this->handleCall($this->filterCall($call)));
        } catch (Exception $exception) {
            return new CallResult($call, null, $this->handleException($exception), null);
        } catch (Throwable $exception) {
            return new CallResult($call, null, $this->handleException($exception), null);
        }
    }

Usage Example

 /**
  * Executes transformation.
  *
  * @param DefinitionCall $definitionCall
  * @param Transformation $transformation
  * @param array          $arguments
  *
  * @return mixed
  *
  * @throws Exception If transformation call throws one
  */
 private function execute(DefinitionCall $definitionCall, Transformation $transformation, array $arguments)
 {
     $call = new TransformationCall($definitionCall->getEnvironment(), $definitionCall->getCallee(), $transformation, $arguments);
     $result = $this->callCenter->makeCall($call);
     if ($result->hasException()) {
         throw $result->getException();
     }
     return $result->getReturn();
 }
All Usage Examples Of Behat\Testwork\Call\CallCenter::makeCall