PMCORE-2583
This commit is contained in:
@@ -10,6 +10,15 @@ class UserTest extends TestCase
|
||||
{
|
||||
use DatabaseTransactions;
|
||||
|
||||
/**
|
||||
* Set up function.
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
User::query()->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the users filters scope with the usr uid filter
|
||||
*
|
||||
@@ -110,9 +119,13 @@ class UserTest extends TestCase
|
||||
]);
|
||||
|
||||
// Assertions
|
||||
$this->assertCount(4, User::getUsersForHome());
|
||||
// Only will considerate the actives
|
||||
$this->assertCount(3, User::getUsersForHome());
|
||||
// Only will considerate the name Smith
|
||||
$this->assertCount(3, User::getUsersForHome('Smith'));
|
||||
$this->assertCount(4, User::getUsersForHome(null, null, 2));
|
||||
// Only will considerate by default the actives
|
||||
$this->assertCount(3, User::getUsersForHome(null, null, 2));
|
||||
// Only will considerate by default the actives and limit
|
||||
$this->assertCount(1, User::getUsersForHome(null, 2, 1));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user