function KernelTestBase::assertPostConditions

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::assertPostConditions()
  2. 10 core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::assertPostConditions()
  3. 11.x core/tests/Drupal/KernelTests/KernelTestBase.php \Drupal\KernelTests\KernelTestBase::assertPostConditions()
1 call to KernelTestBase::assertPostConditions()
KernelTestBaseShutdownTest::assertPostConditions in core/tests/Drupal/KernelTests/KernelTestBaseShutdownTest.php
1 method overrides KernelTestBase::assertPostConditions()
KernelTestBaseShutdownTest::assertPostConditions in core/tests/Drupal/KernelTests/KernelTestBaseShutdownTest.php

File

core/tests/Drupal/KernelTests/KernelTestBase.php, line 594

Class

KernelTestBase
Base class for functional integration tests.

Namespace

Drupal\KernelTests

Code

protected function assertPostConditions() {
    // Execute registered Drupal shutdown functions prior to tearing down.
    // @see _drupal_shutdown_function()
    $callbacks =& drupal_register_shutdown_function();
    while ($callback = array_shift($callbacks)) {
        call_user_func_array($callback['callback'], $callback['arguments']);
    }
    // Shut down the kernel (if bootKernel() was called).
    // @see \Drupal\KernelTests\Core\DrupalKernel\DrupalKernelTest
    if ($this->container) {
        $this->container
            ->get('kernel')
            ->shutdown();
    }
    parent::assertPostConditions();
}

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