function it_should_run_all_on_start_if_defined(Inspector $inspector, GenericEvent $event) { $event->addProcessEvent(Argument::any())->shouldBeCalled(); $inspector->runAll()->shouldBeCalled()->willReturn(array()); $options = array('all_on_start' => true); $this->setOptions($options); $this->start($event); }
function it_should_run_behat(Runner $runner, Process $process, Filesystem $filesystem) { $rerunFile = Inspector::getRerunFileName(); $runner->run(Argument::runnerRun('executable,' . $rerunFile))->shouldBeCalled()->willReturn($process); $process->getExitCode()->shouldBeCalled()->willReturn(0); $filesystem->putFileContents($rerunFile, Argument::any())->shouldBeCalled(); $paths = array('hello.feature', 'world.feature'); $results = $this->run($paths); $results->shouldHaveCount(2); $results->shouldContainMessage('hello.feature'); $results->shouldContainMessage('world.feature'); }