function Y2038TimestampUpdateTest::setUp

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/src/Functional/Update/Y2038TimestampUpdateTest.php \Drupal\Tests\system\Functional\Update\Y2038TimestampUpdateTest::setUp()

Overrides UpdatePathTestBase::setUp

File

core/modules/system/tests/src/Functional/Update/Y2038TimestampUpdateTest.php, line 68

Class

Y2038TimestampUpdateTest
Tests update of timestamp fields to bigint.

Namespace

Drupal\Tests\system\Functional\Update

Code

protected function setUp() : void {
  parent::setUp();
  /** @var \Drupal\Core\Database\Connection $connection */
  $this->connection = \Drupal::service('database');
  if ($this->connection
    ->databaseType() == 'pgsql') {
    $this->databaseName = 'public';
  }
  else {
    $this->databaseName = $this->connection
      ->getConnectionOptions()['database'];
  }
}

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