/** * @param GrumPHP $grumPHP * @param ParserInterface $parser */ public function __construct(GrumPHP $grumPHP, ParserInterface $parser) { $this->grumPHP = $grumPHP; $this->parser = $parser; if (!$parser->isInstalled()) { throw new RuntimeException(sprintf('The %s can\'t run on your system. Please install all dependencies.', $this->getName())); } }
function let(GrumPHP $grumPHP, ParserInterface $parser) { $parser->isInstalled()->willReturn(true); $grumPHP->getTaskConfiguration('phpparser')->willReturn([]); $this->beConstructedWith($grumPHP, $parser); }