С версии: 1.0
Автор: Bernhard Schussek (bschussek@gmail.com)
Пример #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);
 }
Пример #2
0
 /**
  * Callback for creating the "--ascii-doc" handler.
  *
  * @param Args    $args    The console arguments.
  * @param IO      $io      The I/O.
  * @param Command $command The handled command.
  *
  * @return HelpAsciiDocHandler The created handler.
  */
 public function createAsciiDocHandler(Args $args, IO $io, Command $command)
 {
     $path = $this->getAsciiDocPage($command->getApplication(), $args);
     $handler = new HelpAsciiDocHandler($path, $this->executableFinder, $this->processLauncher);
     $handler->setLessBinary($this->lessBinary);
     return $handler;
 }