function ConnectionTest::providerEscapeFields
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerEscapeFields()
- 10 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerEscapeFields()
Data provider for testEscapeField.
Return value
array Array of arrays with the following elements:
- Expected escaped string.
- String to escape.
File
-
core/
tests/ Drupal/ Tests/ Core/ Database/ ConnectionTest.php, line 524
Class
- ConnectionTest
- Tests the Connection class.
Namespace
Drupal\Tests\Core\DatabaseCode
public static function providerEscapeFields() {
return [
[
'/title/',
'title',
[
'/',
'/',
],
],
[
'`backtick`',
'backtick',
[
'`',
'`',
],
],
[
'test.title',
'test.title',
[
'',
'',
],
],
[
'"isDefaultRevision"',
'isDefaultRevision',
],
[
'"isDefaultRevision"',
'"isDefaultRevision"',
],
[
'"entity_test"."isDefaultRevision"',
'entity_test.isDefaultRevision',
],
[
'"entity_test"."isDefaultRevision"',
'"entity_test"."isDefaultRevision"',
],
[
'"entityTest"."isDefaultRevision"',
'"entityTest"."isDefaultRevision"',
],
[
'"entityTest"."isDefaultRevision"',
'entityTest.isDefaultRevision',
],
[
'[entityTest].[isDefaultRevision]',
'entityTest.isDefaultRevision',
[
'[',
']',
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.