Inheritance: implements Phue\Command\CommandInterface
Example #1
0
 /**
  * Test: Is not authorized
  *
  * @covers \Phue\Command\IsAuthorized::send
  */
 public function testIsNotAuthorized()
 {
     // Stub transport's sendRequest
     $this->mockTransport->expects($this->once())->method('sendRequest')->with($this->equalTo("/api/{$this->mockClient->getUsername()}"))->will($this->throwException($this->getMock('\\Phue\\Transport\\Exception\\UnauthorizedUserException')));
     $auth = new IsAuthorized();
     $this->assertFalse($auth->send($this->mockClient));
 }