function FunctionalTestSetupTrait::resetAll

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

\Drupal\simpletest\WebTestBase::setUp()

56 calls to FunctionalTestSetupTrait::resetAll()
AggregatorAdminTest::testSettingsPage in core/modules/aggregator/tests/src/Functional/AggregatorAdminTest.php
Tests the settings form to ensure the correct default values are used.
CKEditorAdminTest::testExistingFormat in core/modules/ckeditor/tests/src/Functional/CKEditorAdminTest.php
Tests configuring a text editor for an existing text format.
CKEditorIntegrationTest::testTranslationAlt in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Test that dialog loads appropriate translation's alt text.
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.

... See full list

File

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

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.