Inheritance: extends CreateSensor
Example #1
0
 /**
  * Test: Send
  *
  * @covers \Phue\Command\UpdateSensorState::send
  */
 public function testSend()
 {
     // Mock client
     $mockClient = Mockery::mock('\\Phue\\Client', array('getUsername' => 'abcdefabcdef01234567890123456789'))->makePartial();
     // Mock client commands
     $mockClient->shouldReceive('getTransport->sendRequest');
     // $command = (new UpdateSensorState('5'))
     // ->stateAttribute('key', 'value')
     // ->send($mockClient);
     $sensor = new UpdateSensorState('5');
     $command = $sensor->stateAttribute('key', 'value')->send($mockClient);
 }