Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FunctionalTestSetupTrait.php

function 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()

1 call to FunctionalTestSetupTrait::resetAll()
FunctionalTestSetupTrait::rebuildAll in core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php
Resets and rebuilds the environment after setup.

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal