src/Loader.php
private function loadFromIterator(\Iterator $iterator)
    {
        $includedFiles = [];

        foreach ($iterator as $file) {
            if (($fileName = $file->getBasename($this->fileExtension)) == $file->getBasename()) {
                continue;
            }

            $sourceFile = realpath($file->getPathName());
            require_once $sourceFile;
            $includedFiles[] = $sourceFile;
        }

        $fixtures = [];
        $declared = get_declared_classes();

        foreach ($declared as $className) {
            $reflClass = new \ReflectionClass($className);
            $sourceFile = $reflClass->getFileName();

            if (in_array($sourceFile, $includedFiles) && !$this->isTransient($className)) {
                $fixture = new $className();
                $fixtures[] = $fixture;
                $this->addFixture($fixture);
            }
        }

        return $fixtures;
    }
private function loadFromIterator(\Iterator $iterator)
    {
        $includedFiles = [];

        foreach ($iterator as $file) {
            if (($fileName = $file->getBasename($this->fileExtension)) == $file->getBasename()) {
                continue;
            }

            $sourceFile = realpath($file->getPathName());
            require_once $sourceFile;
            $includedFiles[] = $sourceFile;
        }

        $fixtures = [];
        $declared = get_declared_classes();

        foreach ($declared as $className) {
            $reflClass = new \ReflectionClass($className);
            $sourceFile = $reflClass->getFileName();

            if (in_array($sourceFile, $includedFiles) && !$this->isTransient($className)) {
                $fixture = new $className();
                $fixtures[] = $fixture;
                $this->addFixture($fixture);
            }
        }

        return $fixtures;
    }
private function loadFromIterator ( \ Iterator $ iterator ) { $ includedFiles = [ ] ; foreach ( $ iterator as $ file ) { if ( ( $ fileName = $ file -> getBasename ( $ this -> fileExtension ) ) == $ file -> getBasename ( ) ) { continue ; } $ sourceFile = realpath ( $ file -> getPathName ( ) ) ; require_once $ sourceFile ; $ includedFiles [ ] = $ sourceFile ; } $ fixtures = [ ] ; $ declared = get_declared_classes ( ) ; foreach ( $ declared as $ className ) { $ reflClass = new \ ReflectionClass ( $ className ) ; $ sourceFile = $ reflClass -> getFileName ( ) ; if ( in_array ( $ sourceFile , $ includedFiles ) && ! $ this -> isTransient ( $ className ) ) { $ fixture = new $ className ( ) ; $ fixtures [ ] = $ fixture ; $ this -> addFixture ( $ fixture ) ; } } return $ fixtures ; }
Load fixtures from files contained in iterator.

@param \Iterator $iterator Iterator over files from which fixtures should be loaded.

@return Neo4jFixtureInterface[] $fixtures Array of loaded fixture object instances.
Load fixtures from files contained in iterator .