blessing-skin-server/tests/ModelsTest/UserTest.php
Pig Fang 3cf19d8656
Apply fixes from StyleCI (#11)
This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).

---

For more information, click [here](https://github.styleci.io/analyses/8wKwbZ).
2019-03-02 22:58:37 +08:00

30 lines
593 B
PHP

<?php
namespace Tests;
use App\Models\User;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class UserTest extends TestCase
{
use DatabaseTransactions;
public function testSign()
{
$user = factory(User::class)->make([
'last_sign_at' => get_datetime_string(time()),
]);
$user->sign();
$this->assertFalse($user->sign());
}
public function testGetNickName()
{
$user = new User();
$this->assertEquals(
trans('general.unexistent-user'),
$user->getNickName()
);
}
}