Пример #1
0
 public function testFreeSpaceShouldThrowAnExceptionWithAnInvalidSessionId()
 {
     $requestBody = '{"method":"free-space","arguments":{"path":"/var/lib/transmission-daemon/downloads"}}';
     $invalidSessionId = uniqid();
     $this->sendRequest($requestBody, $invalidSessionId)->andThrow($this->generateCSRFException());
     try {
         $this->rpcClient->freeSpace($invalidSessionId, '/var/lib/transmission-daemon/downloads');
     } catch (CSRFException $e) {
         $this->assertSame($this->sessionId, $e->getSessionId());
     }
 }