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

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

Set up
public setUp ( )
    public function setUp()
    {
        // Mock client
        $this->mockClient = $this->getMock('\\Phue\\Client', array('getUsername', 'getTransport'), array('127.0.0.1'));
        // Mock transport
        $this->mockTransport = $this->getMock('\\Phue\\Transport\\TransportInterface', array('sendRequest'));
        // Stub client's getUsername method
        $this->mockClient->expects($this->any())->method('getUsername')->will($this->returnValue('abcdefabcdef01234567890123456789'));
        // Stub client getTransport usage
        $this->mockClient->expects($this->any())->method('getTransport')->will($this->returnValue($this->mockTransport));
    }
GetLightByIdTest