Ejemplo n.º 1
0
 function it_should_runAll_after_pass(Runner $runner, Process $process, ContainerInterface $container, PluginInterface $plugin)
 {
     $plugin->getOptions()->willReturn(array('cli' => '--some-options', 'all_after_pass' => true, 'keep_failed' => true, 'run_all' => array('cli' => 'run-all')));
     $this->setContainer($container);
     $results = array('succeed' => ResultEvent::createSucceed('Succeed'));
     Filesystem::create()->serialize($this->cacheFile, $results);
     $runner->run(Argument::any())->shouldBeCalled();
     $process->getExitCode()->shouldBeCalled()->willReturn(0);
     $results = $this->run(array('some_path'));
     $results = $results->getResults();
     $results->shouldHaveCount(2);
 }
Ejemplo n.º 2
0
 function it_should_run_all_after_pass(Runner $runner, Process $process, PluginInterface $plugin, ContainerInterface $container)
 {
     $plugin->getOptions()->willReturn(array('cli' => '--some-options', 'all_after_pass' => true, 'run_all_cli' => '--some-run-all'));
     $this->beConstructedWith();
     $this->setContainer($container);
     $event = ResultEvent::createSucceed('Success');
     Filesystem::create()->serialize($this->cacheFile, array('key' => $event));
     $process->getExitCode()->willReturn(0);
     $runner->run(Argument::any())->willReturn($process)->shouldBeCalled();
     $results = $this->run(array('some_path'))->getResults();
     $results->shouldHaveCount(2);
     $results->shouldHaveKey('all_after_pass');
 }