/** * Test: Send get schedule by id command * * @covers \Phue\Command\GetScheduleById::__construct * @covers \Phue\Command\GetScheduleById::send */ public function testSend() { // Stub transport's sendRequest usage $this->mockTransport->expects($this->once())->method('sendRequest')->with("/api/{$this->mockClient->getUsername()}/schedules/9")->will($this->returnValue(new \stdClass())); // Get schedule $sched = new GetScheduleById(9); $schedule = $sched->send($this->mockClient); // Ensure type is correct $this->assertInstanceOf('\\Phue\\Schedule', $schedule); }