You are here

public function KernelTestBaseTest::testBootEnvironment in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/KernelTestBaseTest.php \Drupal\KernelTests\KernelTestBaseTest::testBootEnvironment()

@covers ::bootEnvironment

File

core/tests/Drupal/KernelTests/KernelTestBaseTest.php, line 32
Contains \Drupal\KernelTests\KernelTestBaseTest.

Class

KernelTestBaseTest
@coversDefaultClass \Drupal\KernelTests\KernelTestBase @group PHPUnit

Namespace

Drupal\KernelTests

Code

public function testBootEnvironment() {
  $this
    ->assertRegExp('/^simpletest\\d{6}$/', $this->databasePrefix);
  $this
    ->assertStringStartsWith('vfs://root/sites/simpletest/', $this->siteDirectory);
  $this
    ->assertEquals(array(
    'root' => array(
      'sites' => array(
        'simpletest' => array(
          substr($this->databasePrefix, 10) => array(
            'files' => array(
              'config' => array(
                'sync' => array(),
              ),
            ),
          ),
        ),
      ),
    ),
  ), vfsStream::inspect(new vfsStreamStructureVisitor())
    ->getStructure());
}