4 changed files with 82 additions and 10 deletions
@ -0,0 +1,28 @@ |
|||||||
|
<?php namespace Tests\Aauth\Database; |
||||||
|
|
||||||
|
use CodeIgniter\Test\CIDatabaseTestCase; |
||||||
|
use App\Models\Aauth\GroupModel; |
||||||
|
|
||||||
|
class GroupModelTest extends CIDatabaseTestCase |
||||||
|
{ |
||||||
|
protected $refresh = true; |
||||||
|
|
||||||
|
protected $basePath = TESTPATH . '../application' . 'Database/Migrations'; |
||||||
|
|
||||||
|
protected $namespace = 'App'; |
||||||
|
|
||||||
|
public function setUp() |
||||||
|
{ |
||||||
|
parent::setUp(); |
||||||
|
|
||||||
|
$this->model = new GroupModel($this->db); |
||||||
|
} |
||||||
|
|
||||||
|
//-------------------------------------------------------------------- |
||||||
|
|
||||||
|
public function testDummy() |
||||||
|
{ |
||||||
|
$groups = $this->model->findAll(); |
||||||
|
$this->assertCount(3, $groups); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,28 @@ |
|||||||
|
<?php namespace Tests\Aauth\Database; |
||||||
|
|
||||||
|
use CodeIgniter\Test\CIDatabaseTestCase; |
||||||
|
use App\Models\Aauth\PermModel; |
||||||
|
|
||||||
|
class PermModelTest extends CIDatabaseTestCase |
||||||
|
{ |
||||||
|
protected $refresh = true; |
||||||
|
|
||||||
|
protected $basePath = TESTPATH . '../application' . 'Database/Migrations'; |
||||||
|
|
||||||
|
protected $namespace = 'App'; |
||||||
|
|
||||||
|
public function setUp() |
||||||
|
{ |
||||||
|
parent::setUp(); |
||||||
|
|
||||||
|
$this->model = new PermModel($this->db); |
||||||
|
} |
||||||
|
|
||||||
|
//-------------------------------------------------------------------- |
||||||
|
|
||||||
|
public function testDummy() |
||||||
|
{ |
||||||
|
$perms = $this->model->findAll(); |
||||||
|
$this->assertCount(0, $perms); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue