function HttpKernelUiHelperTrait::rebuildContainer

Rebuilds the container.

Provided for compatibility with traits that call $this->rebuildContainer(), such as those shared with functional tests.

See also

\Drupal\Core\Test\FunctionalTestSetupTrait::rebuildContainer

File

core/tests/Drupal/Tests/HttpKernelUiHelperTrait.php, line 272

Class

HttpKernelUiHelperTrait
Provides UI helper methods using the HTTP kernel to make requests.

Namespace

Drupal\Tests

Code

protected function rebuildContainer() : void {
  \Drupal::service('kernel')->rebuildContainer();
  $this->container = \Drupal::getContainer();
}

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