Inheritance: extends RuntimeException
 /**
  * @param string[] $directories directories to scan
  *
  * @throws InvalidDirectory
  * @throws InvalidFileInfo
  */
 public function __construct(array $directories)
 {
     $this->aggregateSourceLocator = new AggregateSourceLocator(array_values(array_map(function ($directory) {
         if (!is_string($directory)) {
             throw InvalidDirectory::fromNonStringValue($directory);
         }
         if (!is_dir($directory)) {
             throw InvalidDirectory::fromNonDirectory($directory);
         }
         return new FileIteratorSourceLocator(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory, RecursiveDirectoryIterator::SKIP_DOTS)));
     }, $directories)));
 }
 public function testFromNonDirectoryWithFile()
 {
     $exception = InvalidDirectory::fromNonDirectory(__FILE__);
     self::assertInstanceOf(InvalidDirectory::class, $exception);
     self::assertSame(sprintf('"%s" must be a directory, not a file', __FILE__), $exception->getMessage());
 }