function it_should_handle_runAllCommand_events(GenericEvent $event, ContainerInterface $container, PluginInterface $plugin, Logger $logger) { $event->getSubject()->willReturn($container); $event->addProcessEvent(Argument::any())->shouldBeCalled(); $logger->addDebug(Argument::cetera())->shouldBeCalled(); $logger->addDebug(Argument::containingString('Start'))->shouldBeCalled(); $logger->addDebug(Argument::containingString('End'), Argument::cetera())->shouldBeCalled(); $event->getArgument('plugin')->willReturn(null); $resultEvent = new ProcessEvent($plugin->getWrappedObject(), array()); $plugin->getTitle()->willReturn('PluginSpec'); $plugin->runAll()->shouldBeCalled()->willReturn($resultEvent); $this->runAllCommand($event); }
public function onConfigPostLoad() { $options = $this->options; $filter = $this->filter; array_map(array($filter, 'addDirectoryToWhitelist'), $options['whitelist']); array_map(array($filter, 'addDirectoryToBlacklist'), $options['blacklist']); array_map(array($filter, 'addFileToWhitelist'), $options['whitelist_files']); array_map(array($filter, 'addFileToBlacklist'), $options['blacklist_files']); $enabled = $this->container->getParameter('coverage.enabled', false); $this->options['input.option.enabled'] = $enabled; $this->container->setParameter('coverage.options', $options); $this->logger->addDebug('Coverage configured'); }