public function ConnectionTest::testEscapeField in Drupal 9
@covers ::escapeField @dataProvider providerEscapeFields
File
- core/
tests/ Drupal/ Tests/ Core/ Database/ ConnectionTest.php, line 574
Class
- ConnectionTest
- Tests the Connection class.
Namespace
Drupal\Tests\Core\DatabaseCode
public function testEscapeField($expected, $name, array $identifier_quote = [
'"',
'"',
]) {
$mock_pdo = $this
->createMock(StubPDO::class);
$connection = new StubConnection($mock_pdo, [], $identifier_quote);
$this
->assertEquals($expected, $connection
->escapeField($name));
}