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); }
public function testHelpPrintsTextIfAsciiDocNotFound() { $args = $this->helpCommand->parseArgs(new StringArgs('--help')); $this->processLauncher->expects($this->any())->method('isSupported')->will($this->returnValue(true)); $this->executableFinder->expects($this->never())->method('find'); $this->processLauncher->expects($this->never())->method('launchProcess'); $this->handler->setApplicationPage('foobar'); $status = $this->handler->handle($args, $this->io, $this->command); $expected = <<<'EOF' The Application version 1.2.3 USAGE the-app EOF; $this->assertStringStartsWith($expected, $this->io->fetchOutput()); $this->assertSame(0, $status); }