Exemplo n.º 1
0
 public function __construct()
 {
     @trigger_error(sprintf('The "%s" class is deprecated. You should stop using it, as it will soon be removed in 2.0 version. Use "%s" instead.', __CLASS__, 'Symfony\\CS\\Finder'), E_USER_DEPRECATED);
     parent::__construct();
     $files = $this->getFilesToExclude();
     $this->name('*.xml')->name('*.yml')->filter(function (\SplFileInfo $file) use($files) {
         return !in_array($file->getRelativePathname(), $files, true);
     });
 }
Exemplo n.º 2
0
 public function testThatCustomFinderWorks()
 {
     $finder = Finder::create();
     $finder->in(__DIR__ . '/Fixtures/FinderDirectory');
     $config = Config::create()->finder($finder);
     $iterator = $config->getFinder()->getIterator();
     $this->assertSame(1, count($iterator));
     $iterator->rewind();
     $this->assertSame('somefile.php', $iterator->current()->getFilename());
 }
Exemplo n.º 3
0
 public function __construct()
 {
     @trigger_error(sprintf('The "%s" class is deprecated. You should stop using it, as it will soon be removed in 2.0 version. Use "%s" instead.', __CLASS__, 'Symfony\\CS\\Finder'), E_USER_DEPRECATED);
     parent::__construct();
     $this->name('*.xml')->name('*.yml');
 }
Exemplo n.º 4
0
 /**
  * @expectedException              \LogicException
  * @expectedExceptionMessageRegExp /^You must call (?:the in\(\) method)|(?:one of in\(\) or append\(\)) methods before iterating over a Finder\.$/
  */
 public function testThatDefaultFinderDoesNotSpecifyAnyDirectory()
 {
     $finder = Finder::create();
     $finder->getIterator();
 }