You are here

protected function FunctionalTestSetupTrait::resetAll in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php \Drupal\Core\Test\FunctionalTestSetupTrait::resetAll()
  2. 9 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()

26 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.
DependencyTest::testModuleEnableOrder in core/modules/system/tests/src/Functional/Module/DependencyTest.php
Tests that module dependencies are enabled in the correct order in the UI.

... See full list

File

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

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();
}