public function SelectLeastTest::testSelectLeast in Drupal 9
Tests the SQL LEAST operator.
@dataProvider selectLeastProvider
File
- core/
tests/ Drupal/ KernelTests/ Core/ Database/ SelectLeastTest.php, line 17
Class
- SelectLeastTest
- Tests the SQL LEAST operator.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testSelectLeast($values, $expected) {
$least = $this->connection
->query("SELECT LEAST(:values[])", [
':values[]' => $values,
])
->fetchField();
$this
->assertEquals($expected, $least);
}