function ConnectionTest::testIdentifierQuotesAssertString

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::testIdentifierQuotesAssertString()
  2. 11.x core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::testIdentifierQuotesAssertString()

@covers ::__construct

File

core/tests/Drupal/Tests/Core/Database/ConnectionTest.php, line 593

Class

ConnectionTest
Tests the Connection class.

Namespace

Drupal\Tests\Core\Database

Code

public function testIdentifierQuotesAssertString() : void {
    $this->expectException(\AssertionError::class);
    $this->expectExceptionMessage('\\Drupal\\Core\\Database\\Connection::$identifierQuotes must contain 2 string values');
    $mock_pdo = $this->createMock(StubPDO::class);
    new StubConnection($mock_pdo, [], [
        0,
        '1',
    ]);
}

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