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