function let(ContainerInterface $container, Runner $runner, Process $process, BehatPlugin $plugin, Filesystem $filesystem) { if (is_null(static::$cwd)) { static::$cwd = getcwd(); } if (!is_dir(static::$tmpDir)) { mkdir(static::$tmpDir, 0777, true); } chdir(static::$tmpDir); $container->get('plugins.behat')->willReturn($plugin); $container->get('runner')->willReturn($runner); $this->options = array('all_after_pass' => false, 'cli' => 'run_cli', 'run_all_cli' => 'run_all_cli', 'executable' => 'executable'); $plugin->getOptions()->willReturn($this->options); $runner->run(Argument::any())->willReturn($process); $filesystem->pathExists(Inspector::getRerunFileName())->willReturn(false); $container->get('filesystem')->willReturn($filesystem); $this->rerunFile = Inspector::getRerunFileName(); $this->setContainer($container); }