getServiceLocator()->get(DeliveryContainerService::SERVICE_ID); return $containerService->getTestDefinition($execution); } /** * Return the id of the storage directory for the public content * @param DeliveryExecution $execution * @return string */ public function getPublicDirId(DeliveryExecution $execution) { list($private, $public) = explode('|', $this->getServiceCallParam($execution)); return $public; } /** * Return the id of the storage directory for the private content * @param DeliveryExecution $execution * @return string */ public function getPrivateDirId(DeliveryExecution $execution) { list($private, $public) = explode('|', $this->getServiceCallParam($execution)); return $private; } private function getServiceCallParam(DeliveryExecution $execution) { if (!isset($this->serviceCallParam[$execution->getIdentifier()])) { $containerService = $this->getServiceLocator()->get(DeliveryContainerService::SERVICE_ID); $this->serviceCallParam[$execution->getIdentifier()] = $containerService->getTestCompilation($execution); } return $this->serviceCallParam[$execution->getIdentifier()]; } /** * {@inheritDoc} * @see \oat\taoDelivery\model\container\delivery\AbstractContainer::getExecutionContainer() */ public function getExecutionContainer(DeliveryExecution $execution) { $container = new ExecutionClientContainer($execution); $containerService = $this->getServiceLocator()->get(DeliveryContainerService::SERVICE_ID); // set the test parameters $container->setData('testDefinition', $this->getSourceTest($execution)); $container->setData('testCompilation', $this->getPrivateDirId($execution) . '|' . $this->getPublicDirId($execution)); $container->setData('providers', $containerService->getProviders($execution)); $container->setData('bootstrap', $containerService->getBootstrap($execution)); $container->setData('serviceCallId', $execution->getIdentifier()); $container->setData('deliveryExecution', $execution->getIdentifier()); $container->setData('deliveryServerConfig', []); return $container; } }