public function catchSessionPause(TestExecutionPausedEvent $event)
    {
        $deliveryExecution = ServiceProxy::singleton()->getDeliveryExecution($event->getTestExecutionId());
        /** @var DeliveryExecutionStateService $service */
        $requestParams = \Context::getInstance()->getRequest()->getParameters();
        $reason = null;
        if (isset($requestParams['reason'])) {
            $reason = $requestParams['reason'];
        }
        if ($deliveryExecution->getState()->getUri() !== DeliveryExecution::STATE_PAUSED) {
            $this->pause($deliveryExecution, $reason);
        }
    }
public function catchSessionPause(TestExecutionPausedEvent $event)
    {
        $deliveryExecution = ServiceProxy::singleton()->getDeliveryExecution($event->getTestExecutionId());
        /** @var DeliveryExecutionStateService $service */
        $requestParams = \Context::getInstance()->getRequest()->getParameters();
        $reason = null;
        if (isset($requestParams['reason'])) {
            $reason = $requestParams['reason'];
        }
        if ($deliveryExecution->getState()->getUri() !== DeliveryExecution::STATE_PAUSED) {
            $this->pause($deliveryExecution, $reason);
        }
    }
public function catchSessionPause ( TestExecutionPausedEvent $ event ) { $ deliveryExecution = ServiceProxy :: singleton ( ) -> getDeliveryExecution ( $ event -> getTestExecutionId ( ) ) ; /** @var DeliveryExecutionStateService $service */ $ requestParams = \ Context :: getInstance ( ) -> getRequest ( ) -> getParameters ( ) ; $ reason = null ; if ( isset ( $ requestParams [ 'reason' ] ) ) { $ reason = $ requestParams [ 'reason' ] ; } if ( $ deliveryExecution -> getState ( ) -> getUri ( ) !== DeliveryExecution :: STATE_PAUSED ) { $ this -> pause ( $ deliveryExecution , $ reason ) ; } }
Pause delivery execution if test session was paused.
@param TestExecutionPausedEvent $event
Pause delivery execution if test session was paused .