function SharedDatabaseStateViolationTest::testFinal

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

Tests that the previous restores of the state table succeeded.

Attributes

#[Depends('testInvalidationRecordsTheReason')]

File

core/tests/Drupal/KernelTests/SharedDatabaseStateViolationTest.php, line 186

Class

SharedDatabaseStateViolationTest
Tests how "KernelTestBase" reports shared database state violations.

Namespace

Drupal\KernelTests

Code

public function testFinal() : void {
  $connection = $this->container
    ->get('database');
  $record = $connection->select(self::STATE_TABLE, 's')
    ->fields('s', [
    'status',
    'message',
  ])
    ->execute()
    ->fetchAssoc();
  $this->assertSame('ready', $record['status']);
}

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