/** * 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]); // 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]])); // Send command $command->send($this->mockClient); }