Phue\Test\Command\GetBridgeTest::testGetBridge PHP Method

testGetBridge() public method

Test: Get Bridge
public testGetBridge ( )
    public function testGetBridge()
    {
        // Mock transport results
        $mockTransportResults = new \stdClass();
        // Stub transport's sendRequest usage
        $this->mockTransport->expects($this->once())->method('sendRequest')->with($this->equalTo("/api/{$this->mockClient->getUsername()}/config"))->will($this->returnValue($mockTransportResults));
        // Send command and get response
        $response = $this->getBridge->send($this->mockClient);
        // Ensure we have a bridge object
        $this->assertInstanceOf('\\Phue\\Bridge', $response);
    }