public function ReservedWordTest::testSelectReservedWordTableAllFields in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Database/ReservedWordTest.php \Drupal\KernelTests\Core\Database\ReservedWordTest::testSelectReservedWordTableAllFields()
Tests SELECT query with all fields from a table with a reserved name.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Database/ ReservedWordTest.php, line 36
Class
- ReservedWordTest
- Tests queries that include reserved words.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testSelectReservedWordTableAllFields() {
$query = $this->connection
->select('virtual');
$query
->fields('virtual');
$result = $query
->execute()
->fetchObject();
$this
->assertSame('Function value 1', $result->function);
}