function SharedDatabaseStateTest::insertProbe

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

Inserts a row into the probe table.

Parameters

string $name: The name to store.

File

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

Class

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

Namespace

Drupal\KernelTests

Code

private function insertProbe(string $name) : void {
  $this->container
    ->get('database')
    ->insert(self::PROBE_TABLE)
    ->fields([
    'name' => $name,
  ])
    ->execute();
}

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