transitionTime() public method

Set transition time
public transitionTime ( double $seconds ) : self
$seconds double Time in seconds
return self This object
Example #1
0
 /**
  * Test: Send command
  *
  * @covers \Phue\Command\CreateScene::__construct
  * @covers \Phue\Command\CreateScene::send
  */
 public function testSend()
 {
     $command = new CreateScene('phue-test', 'Scene test', [2, 3]);
     $command->transitionTime(5);
     // Stub transport's sendRequest usage
     $this->mockTransport->expects($this->once())->method('sendRequest')->with($this->equalTo("/api/{$this->mockClient->getUsername()}/scenes/phue-test"), $this->equalTo(TransportInterface::METHOD_PUT), $this->equalTo((object) ['name' => 'Scene test', 'lights' => [2, 3], 'transitiontime' => 50]));
     // Send command
     $command->send($this->mockClient);
 }