/** * Resumes the test from paused state */ public function resume() { $code = 200; try { $serviceContext = $this->getServiceContext(); $result = $this->runnerService->resume($serviceContext); $response = ['success' => $result]; if ($result) { $response['testContext'] = $this->runnerService->getTestContext($serviceContext); } $this->runnerService->persist($serviceContext); } catch (common_Exception $e) { $response = $this->getErrorResponse($e); $code = $this->getErrorCode($e); } $this->returnJson($response, $code); }