Inheritance: extends SetLightState, implements Phue\Command\ActionableInterface
Exemplo n.º 1
0
 /**
  * Test: Get schedulable params
  *
  * @covers \Phue\Command\SetGroupState::getSchedulableParams
  */
 public function testGetSchedulableParams()
 {
     // Build command
     $setGroupStateCmd = new SetGroupState($this->mockGroup);
     // Change alert
     $setGroupStateCmd->alert('select');
     // Ensure schedulable params are expected
     $this->assertEquals(['address' => "/api/{$this->mockClient->getUsername()}/groups/{$this->mockGroup->getId()}/action", 'method' => 'PUT', 'body' => (object) ['alert' => 'select']], $setGroupStateCmd->getSchedulableParams($this->mockClient));
 }
Exemplo n.º 2
0
Arquivo: Group.php Projeto: sqmk/phue
 /**
  * Set scene on group
  *
  * @param mixed $scene
  *            Scene id or Scene object
  *
  * @return self This object
  */
 public function setScene($scene)
 {
     $x = new SetGroupState($this);
     $y = $x->scene((string) $scene);
     $this->client->sendCommand($y);
     return $this;
 }