public function testCreatePlayer()
 {
     try {
         $token = $this->authService->login($this->email, $this->password);
         $this->game->setAuthToken($token);
         $player = $this->playerRegistrationService->createPlayer($this->playerData);
         $this->assertInstanceOf($this->entityClass, $player);
         $this->playerService->getRepository()->remove($player);
     } catch (RegistrationException $e) {
         $this->fail($e->getMessage());
     }
 }
 public function accountAuthAction(Request $req, Response $res)
 {
     $response = new ResponseHelper();
     $token = $this->authService->login($req->request->get("email"), $req->request->get("password"), $req->request->get("remember_me"));
     if ($token instanceof Token) {
         $response->is_good = true;
         $response->response["token"] = $token->getValue();
         $response->response["end_date"] = $token->getEndDate();
     } else {
         $response->is_good = false;
     }
     $res->setData($response);
     $res->send();
 }