[增添]添加了datasource的setting数据库以及默认值
This commit is contained in:
23
vendor/anourvalar/eloquent-serialize/tests/HavingTest.php
vendored
Normal file
23
vendor/anourvalar/eloquent-serialize/tests/HavingTest.php
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
|
||||
class HavingTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
// One column
|
||||
$this->compare(User::groupBy(['id'])->having('id', '>', 1));
|
||||
|
||||
// Two columns
|
||||
$this->compare(User::groupBy(['id', 'title'])->having('id', '>', 1)->orHaving('title', '=', 'abc'));
|
||||
|
||||
// Raw
|
||||
$this->compare(User::groupBy('id')->havingRaw('COUNT(id) > ?', [1]));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user