Webmozart\Console\Handler\Help\HelpAsciiDocHandler::setLessBinary PHP Метод

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

Sets the "less" binary used to display the AsciiDoc page.
public setLessBinary ( string $lessBinary )
$lessBinary string The "less" binary to use.
    public function setLessBinary($lessBinary)
    {
        if (null !== $lessBinary) {
            Assert::string($lessBinary, 'The less binary must be a string or null. Got: %s');
            Assert::notEmpty($lessBinary, 'The less binary must not be empty.');
        }
        $this->lessBinary = $lessBinary;
    }

Usage Example

Пример #1
0
 public function testHandleWithCustomLessBinary()
 {
     $this->processLauncher->expects($this->once())->method('isSupported')->will($this->returnValue(true));
     $this->executableFinder->expects($this->never())->method('find');
     $this->processLauncher->expects($this->once())->method('launchProcess')->with('my-less %path%', array('path' => $this->path), false)->will($this->returnValue(123));
     $this->handler->setLessBinary('my-less');
     $status = $this->handler->handle($this->args, $this->io, $this->command);
     $this->assertSame(123, $status);
 }
All Usage Examples Of Webmozart\Console\Handler\Help\HelpAsciiDocHandler::setLessBinary