TestInstallStorage.php

Same filename in other branches
  1. 8.9.x core/modules/config/tests/config_test/src/TestInstallStorage.php
  2. 10 core/modules/config/tests/config_test/src/TestInstallStorage.php
  3. 11.x core/modules/config/tests/config_test/src/TestInstallStorage.php

Namespace

Drupal\config_test

File

core/modules/config/tests/config_test/src/TestInstallStorage.php

View source
<?php

namespace Drupal\config_test;

use Drupal\Core\Config\InstallStorage;
use Drupal\Core\Extension\ExtensionDiscovery;

/**
 * Tests configuration of profiles, modules and themes.
 *
 * A test configuration storage to read configuration from all profiles, modules
 * and themes regardless of installation status or installed profile.
 */
class TestInstallStorage extends InstallStorage {
    
    /**
     * {@inheritdoc}
     */
    protected function getAllFolders() {
        if (!isset($this->folders)) {
            $this->folders = $this->getCoreNames();
            $listing = new ExtensionDiscovery(\Drupal::root());
            $listing->setProfileDirectories([]);
            $this->folders += $this->getComponentNames($listing->scan('profile'));
            $this->folders += $this->getComponentNames($listing->scan('module'));
            $this->folders += $this->getComponentNames($listing->scan('theme'));
        }
        return $this->folders;
    }

}

Classes

Title Deprecated Summary
TestInstallStorage Tests configuration of profiles, modules and themes.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.