send() public method

Send command
public send ( Client $client ) : boolean
$client Phue\Client Phue Client
return boolean True if authorized, false if not
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));
 }