public function testSessionCloseShouldThrowAnExceptionWithAnInvalidSessionId() { $requestBody = '{"method":"session-close"}'; $invalidSessionId = uniqid(); $this->sendRequest($requestBody, $invalidSessionId)->andThrow($this->generateCSRFException()); try { $this->rpcClient->sessionClose($invalidSessionId); } catch (CSRFException $e) { $this->assertSame($this->sessionId, $e->getSessionId()); } }