25 changed files with 605 additions and 299 deletions
@ -1,21 +0,0 @@ |
|||||||
<?php namespace Tests\Aauth\Libraries\Aauth; |
|
||||||
|
|
||||||
use App\Libraries\Aauth; |
|
||||||
|
|
||||||
class CallTest extends \CIUnitTestCase |
|
||||||
{ |
|
||||||
public function setUp() |
|
||||||
{ |
|
||||||
parent::setUp(); |
|
||||||
|
|
||||||
$this->library = new Aauth(); |
|
||||||
} |
|
||||||
|
|
||||||
//-------------------------------------------------------------------- |
|
||||||
|
|
||||||
public function testFailCall() |
|
||||||
{ |
|
||||||
$this->expectException('ErrorException'); // Or whichever exception it is |
|
||||||
$this->library->getNotExistingFunc(); |
|
||||||
} |
|
||||||
} |
|
@ -0,0 +1,28 @@ |
|||||||
|
<?php namespace Tests\Aauth\Libraries\Aauth; |
||||||
|
|
||||||
|
use App\Libraries\Aauth; |
||||||
|
|
||||||
|
class UtilityTest extends \CIUnitTestCase |
||||||
|
{ |
||||||
|
public function setUp() |
||||||
|
{ |
||||||
|
parent::setUp(); |
||||||
|
|
||||||
|
$this->library = new Aauth(null, true); |
||||||
|
} |
||||||
|
|
||||||
|
//-------------------------------------------------------------------- |
||||||
|
|
||||||
|
public function testFailModel() |
||||||
|
{ |
||||||
|
$this->assertInstanceOf('\App\Models\Aauth\GroupToUserModel', $this->library->getModel('group to user')); |
||||||
|
$this->assertInstanceOf('\App\Models\Aauth\GroupToUserModel', $this->library->getModel('group_to_user')); |
||||||
|
$this->assertFalse($this->library->getModel('NotExisting')); |
||||||
|
} |
||||||
|
|
||||||
|
public function testFailCall() |
||||||
|
{ |
||||||
|
$this->expectException('ErrorException'); |
||||||
|
$this->library->getNotExistingFunc(); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue