Returns the fixture objects as specified in [[globalFixtures()]] and [[fixtures()]].

@throws InvalidConfigException

@return Fixture[] the loaded fixtures for the current test case
559425
public function getFixtures()
    {
        if ($this->_fixtures === null) {
            $this->_fixtures = $this->createFixtures($this->fixtures());
        }

        return $this->_fixtures;
    }
595362
public function get(): array
    {
        list ($generatorClass, $dispatcherClass) = $this->getGeneratorAndDispatcherClasses();

        $routesData = $this
            ->createRouter($generatorClass, $dispatcherClass)
            ->getCachedRoutes($this->addRoutes($this->createGroup()));

        $globalConfigurators = iterator_to_array($this->getGlobalContainerConfigurators(), false);
        $globalMiddleware    = iterator_to_array($this->getGlobalMiddleWareHandlers(), false);

        return [
            static::KEY_ROUTER_PARAMS                  => [
                static::KEY_ROUTER_PARAMS__GENERATOR  => $generatorClass,
                static::KEY_ROUTER_PARAMS__DISPATCHER => $dispatcherClass,
            ],
            static::KEY_ROUTES_DATA                    => $routesData,
            static::KEY_GLOBAL_CONTAINER_CONFIGURATORS => $globalConfigurators,
            static::KEY_GLOBAL_MIDDLEWARE              => $globalMiddleware,
        ];
    }
1040461
private function getContainerConfigObjects() : array
    {
        $config = (new ConfigAggregator($this->getConfigProviders()))->getMergedConfig();
        $containerConfigs = [];

        foreach ($this->getContainerConfigs() as $containerConfig)
        {
            $containerConfigs[] = new $containerConfig($config);
        }
        return $containerConfigs;
    }
649597
public function load() : array
    {
        if (!$this->exists()){
            throw new ConfigFileNotFoundException($this);
        }
        if (!$this->canRead()){
            throw new ConfigFileNotReadableException($this);
        }
    
        $contents = NULL;
        try{
            $contents = $this->getContents();
        }
        catch( FileSystemExceptionInterface $e ){
            throw new ConfigFileInputException($this, $e);
        }
        
        $data = Yaml::parse($contents);
        
        return $data;
    }
271139
protected function loadFixtures(array $fixtures = null)
    {
        foreach ($this->fetchFixtures($fixtures) as $fixture) {
            $this->processFixture($fixture);
        }
    }
108576
public function renderItems()
    {
        $items = [];
        foreach ($this->items as $item) {
            $options = $this->itemOptions;
            $tag = ArrayHelper::remove($options, 'tag', 'li');
            if (is_array($item)) {
                if (!array_key_exists('content', $item)) {
                    throw new InvalidConfigException("The 'content' option is required.");
                }
                $options = array_merge($options, ArrayHelper::getValue($item, 'options', []));
                $tag = ArrayHelper::remove($options, 'tag', $tag);
                $items[] = Html::tag($tag, $item['content'], $options);
            } else {
                $items[] = Html::tag($tag, $item, $options);
            }
        }
        return implode("\n", $items);
    }
282677
public function getMergedLocalConfiguration(): array
    {
        if ($this->mainConfig === null) {
            $this->mainConfig = $this->configLoader->load();
        }

        return $this->mainConfig;
    }
689797
private function fetchFixtures()
    {
        $this->loader = $this->getFixtureLoader();

        $bundleDirectories = $this->autoload ? $this->getBundleFixtureDirectories() : array();

        $this->fetchFixturesFromDirectories($bundleDirectories);
        $this->fetchFixturesFromDirectories($this->directories ?: array());
        $this->fetchFixturesFromClasses($this->fixtures ?: array());

        return $this->loader->getFixtures();
    }
272329
protected function getSettingsConfig(): array
    {
        if (!$this->cache instanceof Cache) {
            $this->items = $this->model->getSettings();
        } else {
            $cacheItems = $this->cache->get($this->cacheKey);
            if (!empty($cacheItems)) {
                $this->items = $cacheItems;
            } else {
                $this->items = $this->model->getSettings();
                $this->cache->set($this->cacheKey, $this->items);
            }
        }

        return $this->items;
    }
344749
protected function getGlobals()
    {
        global $GLOBALS;

        $names = \array_keys($GLOBALS);
        \natcasesort($names);

        $ret = [];
        foreach ($names as $name) {
            $ret[$name] = $GLOBALS[$name];
        }

        return $ret;
    }
637230
public function setFixtures($table, $fixtures, $generator = null, $baseIndex = 0)
    {
        $loading = $this->currentSession->into($table);
        if ($generator) {
            $loading = $loading->with($generator);
        }
        return $loading->load($fixtures, $baseIndex);
    }
644887
protected function getConfigs()
    {
    	if (!$configs = $this->container->getParameter($this->getRequest()->get('config_identifier', 'none'))){
            throw new \InvalidArgumentException('Configs does no exist!');
    	}
    	
    	return $configs;
    }
1270433
public static function getPossibleValues(): array
    {
        if ((static::$possibleValues[static::class] ?? null) === null) {
            static::$possibleValues[static::class] = [];
            try {
                $reflectionClass = new \ReflectionClass(static::class);
            } catch (\ReflectionException $reflectionException) {
                throw new Exceptions\CanNotDeterminePossibleValuesFromClassReflection($reflectionException->getMessage());
            }
            foreach ($reflectionClass->getReflectionConstants() as $reflectionConstant) {
                if ($reflectionConstant->isPublic()) {
                    static::$possibleValues[static::class][] = $reflectionConstant->getValue();
                }
            }
        }

        return static::$possibleValues[static::class];
    }
489831
public function getFixture(string $name): Fixture
    {
        if ($this->_fixtures === null) {
            $this->_fixtures = $this->createFixtures($this->fixtures());
        }

        $name = ltrim($name, '\\');

        return $this->_fixtures[$name] ?? null;
    }
42076
public function load() : array
    {
        if (!$this->exists()){
            throw new ConfigFileNotFoundException($this);
        }
        if (!$this->canRead()){
            throw new ConfigFileNotReadableException($this);
        }
    
        try{
            $this->getContents();
        }
        catch( FileSystemExceptionInterface $e ){
            throw new ConfigFileInputException($this, $e);
        }
        
        $data = require($this->getPath());
        
        // throws exception when the script file did not return anything, or returns invalid value type.
        if ($data === NULL){
            throw new EmptyConfigFileException($this);
        }
        else if (!is_array($data)){
            throw new InvalidConfigFileException($this);
        }
        
        return $data;
    }
588953
protected function _initObjects()
    {
        $this->_configDataObject = $this->_configFactory->create(
            [
                'data' => [
                    'section'   => $this->getSectionCode(),
                    'container' => $this->getContainerCode(),
                    'store'     => $this->getStoreCode(),
                ],
            ]
        );

        $this->_configData       = $this->_configDataObject->load();
        $this->_fieldsetRenderer = $this->_fieldsetFactory->create();
        $this->_fieldRenderer    = $this->_fieldFactory->create();

        return $this;
    }
1216708
private function orderFixturesByDependencies()
    {
        $sequenceForClasses = [];

        // If fixtures were already ordered by number then we need 
        // to remove classes which are not instances of OrderedFixtureInterface
        // in case fixtures implementing DependentFixtureInterface exist.
        // This is because, in that case, the method orderFixturesByDependencies
        // will handle all fixtures which are not instances of 
        // OrderedFixtureInterface
        if ($this->orderFixturesByNumber) {
            $count = count($this->orderedFixtures);

            for ($i = 0 ; $i < $count ; ++$i) {
                if (!($this->orderedFixtures[$i] instanceof OrderedFixtureInterface)) {
                    unset($this->orderedFixtures[$i]);
                }
            }
        }

        // First we determine which classes has dependencies and which don't
        foreach ($this->fixtures as $fixture) {
            $fixtureClass = get_class($fixture);

            if ($fixture instanceof OrderedFixtureInterface) {
                continue;
            } elseif ($fixture instanceof DependentFixtureInterface) {
                $dependenciesClasses = $fixture->getDependencies();
                
                $this->validateDependencies($dependenciesClasses);

                if (!is_array($dependenciesClasses) || empty($dependenciesClasses)) {
                    throw new \InvalidArgumentException(sprintf('Method "%s" in class "%s" must return an array of classes which are dependencies for the fixture, and it must be NOT empty.', 'getDependencies', $fixtureClass));
                }

                if (in_array($fixtureClass, $dependenciesClasses)) {
                    throw new \InvalidArgumentException(sprintf('Class "%s" can\'t have itself as a dependency', $fixtureClass));
                }
                
                // We mark this class as unsequenced
                $sequenceForClasses[$fixtureClass] = -1;
            } else {
                // This class has no dependencies, so we assign 0
                $sequenceForClasses[$fixtureClass] = 0;
            }
        }

        // Now we order fixtures by sequence
        $sequence = 1;
        $lastCount = -1;
        
        while (($count = count($unsequencedClasses = $this->getUnsequencedClasses($sequenceForClasses))) > 0 && $count !== $lastCount) {
            foreach ($unsequencedClasses as $key => $class) {
                $fixture = $this->fixtures[$class];
                $dependencies = $fixture->getDependencies();
                $unsequencedDependencies = $this->getUnsequencedClasses($sequenceForClasses, $dependencies);

                if (count($unsequencedDependencies) === 0) {
                    $sequenceForClasses[$class] = $sequence++;
                }                
            }
            
            $lastCount = $count;
        }

        $orderedFixtures = [];
        
        // If there're fixtures unsequenced left and they couldn't be sequenced, 
        // it means we have a circular reference
        if ($count > 0) {
            $msg = 'Classes "%s" have produced a CircularReferenceException. ';
            $msg .= 'An example of this problem would be the following: Class C has class B as its dependency. ';
            $msg .= 'Then, class B has class A has its dependency. Finally, class A has class C as its dependency. ';
            $msg .= 'This case would produce a CircularReferenceException.';
            
            throw new CircularReferenceException(sprintf($msg, implode(',', $unsequencedClasses)));
        } else {
            // We order the classes by sequence
            asort($sequenceForClasses);

            foreach ($sequenceForClasses as $class => $sequence) {
                // If fixtures were ordered 
                $orderedFixtures[] = $this->fixtures[$class];
            }
        }

        $this->orderedFixtures = array_merge($this->orderedFixtures, $orderedFixtures);
    }