blessing-skin-server/tests/ServicesTest/RepositoriesTest/UserRepositoryTest.php
2017-12-28 12:52:29 +08:00

25 lines
604 B
PHP

<?php
use App\Models\User;
use App\Services\Repositories\UserRepository;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class UserRepositoryTest extends TestCase
{
use DatabaseTransactions;
public function testHas()
{
$repo = new UserRepository();
$this->assertFalse($repo->has('not_found', 'invalid'));
}
public function testGet()
{
$repo = new UserRepository();
$this->assertNull($repo->get('not_found', 'username'));
}
}