Пример #1
0
 public function testQueueMoveTopShouldThrowAnExceptionWithAnInvalidSessionId()
 {
     $requestBody = '{"method":"queue-move-top","arguments":{"ids":[42,1337]}}';
     $invalidSessionId = uniqid();
     $this->sendRequest($requestBody, $invalidSessionId)->andThrow($this->generateCSRFException());
     try {
         $this->rpcClient->queueMoveTop($invalidSessionId, [42, 1337]);
     } catch (CSRFException $e) {
         $this->assertSame($this->sessionId, $e->getSessionId());
     }
 }