1 changed files with 31 additions and 0 deletions
@ -0,0 +1,31 @@
|
||||
<?php namespace Tests\Aauth\Database; |
||||
|
||||
use Config\Services; |
||||
use CodeIgniter\Test\CIDatabaseTestCase; |
||||
use CodeIgniter\Database; |
||||
use \App\Models\Aauth\UserModel as UserModel; |
||||
|
||||
class UserModelTest extends CIDatabaseTestCase |
||||
{ |
||||
protected $refresh = true; |
||||
|
||||
protected $basePath = APPPATH . 'Database/Migrations'; |
||||
|
||||
protected $namespace = 'App'; |
||||
|
||||
public function setUp() |
||||
{ |
||||
parent::setUp(); |
||||
|
||||
$this->model = new UserModel(); |
||||
} |
||||
|
||||
//-------------------------------------------------------------------- |
||||
|
||||
public function testFindReturnsRow() |
||||
{ |
||||
$user = $this->model->find(1); |
||||
$this->assertEquals('admin', $user['username']); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue