function SelectLeastTest::testSelectLeast
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Database/SelectLeastTest.php \Drupal\KernelTests\Core\Database\SelectLeastTest::testSelectLeast()
- 11.x core/tests/Drupal/KernelTests/Core/Database/SelectLeastTest.php \Drupal\KernelTests\Core\Database\SelectLeastTest::testSelectLeast()
Tests the SQL LEAST operator.
@dataProvider selectLeastProvider
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Database/ SelectLeastTest.php, line 19
Class
- SelectLeastTest
- Tests the SQL LEAST operator.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testSelectLeast($values, $expected) : void {
$least = $this->connection
->query("SELECT LEAST(:values[])", [
':values[]' => $values,
])
->fetchField();
$this->assertEquals($expected, $least);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.