Phue\Test\BridgeTest::testEnableDhcp PHP Method

testEnableDhcp() public method

Test: Disabling DHCP
public testEnableDhcp ( )
    public function testEnableDhcp()
    {
        // Expect client's sendCommand usage
        $this->mockClient->expects($this->once())->method('sendCommand')->with($this->isInstanceOf('\\Phue\\Command\\SetBridgeConfig'))->will($this->returnValue($this->bridge));
        // Ensure enableDhcp returns self
        $this->assertEquals($this->bridge, $this->bridge->enableDhcp(false));
        // Ensure new value can be retrieved by isDhcpEnabled
        $this->assertFalse($this->bridge->isDhcpEnabled());
    }