Phue\Test\Command\GetLightByIdTest::testSend PHP Метод

testSend() публичный Метод

Test: Send get light by id command
public testSend ( )
    public function testSend()
    {
        // Stub transport's sendRequest usage
        $this->mockTransport->expects($this->once())->method('sendRequest')->with("/api/{$this->mockClient->getUsername()}/lights/10")->will($this->returnValue(new \stdClass()));
        // Get light
        $x = new GetLightById(10);
        $light = $x->send($this->mockClient);
        // Ensure type is correct
        $this->assertInstanceOf('\\Phue\\Light', $light);
    }
GetLightByIdTest