Clinner\Command\Tests\CallbackTest::testToCommandString PHP Method

testToCommandString() public method

public testToCommandString ( )
    public function testToCommandString()
    {
        $expected = 'callback function code';
        $callback = $this->getMockBuilder('\\Clinner\\Command\\Callback')->disableOriginalConstructor()->setMethods(array('getCallbackCode'))->getMock();
        $callback->expects($this->once())->method('getCallbackCode')->will($this->returnValue($expected));
        $result = $callback->toCommandString();
        $this->assertEquals($expected, $result);
    }