25 changed files with 605 additions and 299 deletions
@ -1,12 +1,20 @@
|
||||
; top-most EditorConfig file |
||||
root = true |
||||
|
||||
; Unix-style newlines |
||||
[*] |
||||
end_of_line = lf |
||||
|
||||
[*.php] |
||||
indent_style = tab |
||||
charset = utf-8 |
||||
trim_trailing_whitespace = true |
||||
insert_final_newline = true |
||||
; top-most EditorConfig file |
||||
root = true |
||||
|
||||
; Unix-style newlines |
||||
[*] |
||||
end_of_line = lf |
||||
|
||||
[*.php] |
||||
indent_style = tab |
||||
charset = utf-8 |
||||
trim_trailing_whitespace = true |
||||
insert_final_newline = true |
||||
|
||||
|
||||
[*.rst] |
||||
indent_style = space |
||||
charset = utf-8 |
||||
indent_size = 4 |
||||
trim_trailing_whitespace = true |
||||
insert_final_newline = true |
||||
|
@ -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