send() public method

Send command
public send ( Client $client ) : stdClass
$client Phue\Client Phue Client
return stdClass Authentication response
Esempio n. 1
0
 /**
  * Test: Send create user command
  *
  * @covers \Phue\Command\CreateUser::send
  * @covers \Phue\Command\CreateUser::buildRequestData
  */
 public function testSend()
 {
     // Set up device type to pass to create user command
     $deviceType = 'phpunit';
     // Stub transport's sendRequest method
     $this->mockTransport->expects($this->once())->method('sendRequest')->with($this->equalTo('/api'), $this->equalTo('POST'), $this->anything())->will($this->returnValue('success!'));
     $x = new CreateUser('phpunit');
     $this->assertEquals('success!', $x->send($this->mockClient));
 }