/** * Sets the test in paused state */ public function pause() { $code = 200; try { $serviceContext = $this->getServiceContext(); $response = ['success' => $this->runnerService->pause($serviceContext)]; $this->runnerService->persist($serviceContext); } catch (common_Exception $e) { $response = $this->getErrorResponse($e); $code = $this->getErrorCode($e); } $this->returnJson($response, $code); }