function SharedDatabaseStateTest::testFirst

Same name and namespace in other branches
  1. main core/tests/Drupal/KernelTests/SharedDatabaseStateTest.php \Drupal\KernelTests\SharedDatabaseStateTest::testFirst()

Initial test method.

File

core/tests/Drupal/KernelTests/SharedDatabaseStateTest.php, line 77

Class

SharedDatabaseStateTest
Tests the shared database state of Drupal\KernelTests\KernelTestBase.

Namespace

Drupal\KernelTests

Code

public function testFirst() : void {
  // The probe table exists and holds exactly what ::setUpEnvironment() put
  // in it. Had ::setUpEnvironment() run a second time, creating the table
  // again would have failed.
  $this->assertSame([
    [
      'id' => '1',
      'name' => 'initial',
    ],
  ], $this->readProbes());
}

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