function FunctionalTestSetupTrait::resetAll

Same name in other branches
  1. 9 core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php \Drupal\Core\Test\FunctionalTestSetupTrait::resetAll()
  2. 8.9.x core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php \Drupal\Core\Test\FunctionalTestSetupTrait::resetAll()
  3. 10 core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php \Drupal\Core\Test\FunctionalTestSetupTrait::resetAll()

Resets all data structures after having enabled new modules.

This method is called by FunctionalTestSetupTrait::rebuildAll() after enabling the requested modules. It must be called again when additional modules are enabled later.

See also

\Drupal\Core\Test\FunctionalTestSetupTrait::rebuildAll()

\Drupal\Tests\BrowserTestBase::installDrupal()

61 calls to FunctionalTestSetupTrait::resetAll()
ClassLoaderTest::testAutoloadFromModuleFile in core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php
Tests that .module files can use class constants in main section.
ClassLoaderTest::testClassLoading in core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php
Tests that module-provided classes can be loaded when a module is enabled.
ClassLoaderTest::testClassLoadingDisabledModules in core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php
Tests that module-provided classes can't be loaded from disabled modules.
ClassLoaderTest::testClassLoadingNotInstalledModules in core/modules/system/tests/src/Functional/Module/ClassLoaderTest.php
Tests that module-provided classes can't be loaded if module not installed.
ConfigImportAllTest::testInstallUninstall in core/modules/config/tests/src/Functional/ConfigImportAllTest.php
Tests that a fixed set of modules can be installed and uninstalled.

... See full list

File

core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php, line 248

Class

FunctionalTestSetupTrait
Defines a trait for shared functional test setup functionality.

Namespace

Drupal\Core\Test

Code

protected function resetAll() {
    // Clear all database and static caches and rebuild data structures.
    drupal_flush_all_caches();
    $this->container = \Drupal::getContainer();
    // Reset static variables and reload permissions.
    $this->refreshVariables();
}

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