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); }); }
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()); }
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'); }
/** * @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(); }