public function testItFindsFindsFilesByGlobbingWithBraces()
 {
     $this->createTestFile('global.php');
     $this->createTestFile('database.local.php');
     $this->createTestFile('nothing.php');
     $this->createTestFile('nothing.php.dist');
     $files = $this->locator->locate($this->getTestPath('{,*.}{global,local}.php'));
     assertEquals([$this->getTestPath('global.php'), $this->getTestPath('database.local.php')], $files);
 }
 /**
  * @param string $pattern
  *
  * @throws NoMatchingFilesException
  * @throws InvalidArgumentException
  *
  * @return $this
  */
 public function configFromFiles($pattern)
 {
     Assertion::string($pattern);
     $locator = new FileReader\FileLocator();
     $files = $locator->locate($pattern);
     if (count($files) === 0) {
         throw NoMatchingFilesException::fromPattern($pattern);
     }
     foreach ($files as $filename) {
         $this->readFileAndMergeConfig($filename);
     }
     return $this;
 }