public function ConnectionTest::providerEscapeDatabase in Drupal 9
Data provider for testEscapeDatabase.
Return value
array An indexed array of where each value is an array of arguments to pass to testEscapeField. The first value is the expected value, and the second value is the value to test.
File
- core/
tests/ Drupal/ Tests/ Core/ Database/ ConnectionTest.php, line 589
Class
- ConnectionTest
- Tests the Connection class.
Namespace
Drupal\Tests\Core\DatabaseCode
public function providerEscapeDatabase() {
return [
[
'/name/',
'name',
[
'/',
'/',
],
],
[
'`backtick`',
'backtick',
[
'`',
'`',
],
],
[
'testname',
'test.name',
[
'',
'',
],
],
[
'"name"',
'name',
],
[
'[name]',
'name',
[
'[',
']',
],
],
];
}