public function ConnectionTest::providerTestPrefixTables in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerTestPrefixTables()
- 10 core/tests/Drupal/Tests/Core/Database/ConnectionTest.php \Drupal\Tests\Core\Database\ConnectionTest::providerTestPrefixTables()
Dataprovider for testPrefixTables().
Return value
array Array of arrays with the following elements:
- Expected result.
- Table prefix.
- Query to be prefixed.
File
- core/
tests/ Drupal/ Tests/ Core/ Database/ ConnectionTest.php, line 74
Class
- ConnectionTest
- Tests the Connection class.
Namespace
Drupal\Tests\Core\DatabaseCode
public function providerTestPrefixTables() {
return [
[
'SELECT * FROM test_table',
'test_',
'SELECT * FROM {table}',
],
[
'SELECT * FROM first_table JOIN second_thingie',
[
'table' => 'first_',
'thingie' => 'second_',
],
'SELECT * FROM {table} JOIN {thingie}',
],
];
}