[增添]添加了datasource的setting数据库以及默认值
This commit is contained in:
36
vendor/anourvalar/eloquent-serialize/tests/ScopeTest.php
vendored
Normal file
36
vendor/anourvalar/eloquent-serialize/tests/ScopeTest.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace AnourValar\EloquentSerialize\Tests;
|
||||
|
||||
use AnourValar\EloquentSerialize\Tests\Models\User;
|
||||
use AnourValar\EloquentSerialize\Tests\Models\UserPhone;
|
||||
|
||||
class ScopeTest extends AbstractSuite
|
||||
{
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testSimple()
|
||||
{
|
||||
// One way
|
||||
$this->compare(User::withTrashed());
|
||||
|
||||
// Reverted
|
||||
$this->compare(User::withTrashed()->withoutTrashed());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testWithParams()
|
||||
{
|
||||
// Primary
|
||||
$this->compare(UserPhone::major(true));
|
||||
|
||||
// NOT primary
|
||||
$this->compare(UserPhone::major(false));
|
||||
|
||||
// Combine
|
||||
$this->compare(UserPhone::major(false)->search('906'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user