查询一个字段的值.value
Testing Is Documentation
tests/Database/Read/ValueTest.php
Uses
<?php
use Tests\Database\DatabaseTestCase as TestCase;
value 查询基础用法
public function testBaseUse(): void
{
$connect = $this->createDatabaseConnectMock();
$sql = <<<'eot'
[
"SELECT `test`.`id` FROM `test` LIMIT 1",
[],
false
]
eot;
$this->assertSame(
$sql,
$this->varJson(
$connect
->sql()
->table('test')
->value('id')
)
);
}