示例#1
0
 /**
  * @param  EvaluateEvent $event
  * @return array
  */
 public function getMatchedFiles(EvaluateEvent $event)
 {
     $container = $this->container;
     $filtered = array();
     $files = $event->getFiles();
     foreach ($files as $file) {
         if ($file == $container->getParameter('config.file')) {
             continue;
         }
         if ($matched = $this->matchFile($file)) {
             if (!$matched instanceof SplFileInfo) {
                 $matched = PathUtil::createSplFileInfo(getcwd(), $matched);
             }
             $filtered[] = $matched;
         }
     }
     return $filtered;
 }
示例#2
0
 function its_getMatchedFiles_should_not_process_configuration_file(EvaluateEvent $event, ContainerInterface $container, Watcher $watcher)
 {
     $watcher->matchFile('config_file')->shouldNotBeCalled();
     $event->getFiles()->willReturn(array('config_file'));
     $this->getMatchedFiles($event);
 }