Пример #1
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());
 }
Пример #2
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();
 }