function SimpletestTestRunResultsStorageTest::testBuildNewEnvironment

Same name in other branches
  1. 10 core/tests/Drupal/KernelTests/Core/Test/SimpletestTestRunResultsStorageTest.php \Drupal\KernelTests\Core\Test\SimpletestTestRunResultsStorageTest::testBuildNewEnvironment()

@covers ::buildTestingResultsEnvironment @covers ::validateTestingResultsEnvironment

File

core/tests/Drupal/KernelTests/Core/Test/SimpletestTestRunResultsStorageTest.php, line 48

Class

SimpletestTestRunResultsStorageTest
@coversDefaultClass \Drupal\Core\Test\SimpletestTestRunResultsStorage @group Test

Namespace

Drupal\KernelTests\Core\Test

Code

public function testBuildNewEnvironment() : void {
    $schema = $this->connection
        ->schema();
    $this->assertFalse($schema->tableExists('simpletest'));
    $this->assertFalse($schema->tableExists('simpletest_test_id'));
    $this->assertFalse($this->testRunResultsStorage
        ->validateTestingResultsEnvironment());
    $this->testRunResultsStorage
        ->buildTestingResultsEnvironment(FALSE);
    $this->assertTrue($schema->tableExists('simpletest'));
    $this->assertTrue($schema->tableExists('simpletest_test_id'));
    $this->assertTrue($this->testRunResultsStorage
        ->validateTestingResultsEnvironment());
}

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