mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
31 lines
709 B
PHP
31 lines
709 B
PHP
<?php
|
|
|
|
use App\Models\User;
|
|
use App\Services\Utils;
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
|
|
class UserTest extends TestCase
|
|
{
|
|
use DatabaseTransactions;
|
|
|
|
public function testSign()
|
|
{
|
|
$user = factory(User::class)->make([
|
|
'last_sign_at' => Utils::getTimeFormatted(time())
|
|
]);
|
|
$user->sign();
|
|
$this->assertFalse($user->sign());
|
|
}
|
|
|
|
public function testGetNickName()
|
|
{
|
|
$user = new User();
|
|
$this->assertEquals(
|
|
trans('general.unexistent-user'),
|
|
$user->getNickName()
|
|
);
|
|
}
|
|
}
|