diff --git a/src/Utility/TinyAuth.php b/src/Utility/TinyAuth.php index 7853c4bb..5be95fa7 100644 --- a/src/Utility/TinyAuth.php +++ b/src/Utility/TinyAuth.php @@ -25,7 +25,7 @@ public function __construct(array $config = []) { } /** - * @return string[] + * @return int[] */ public function getAvailableRoles() { $roles = $this->_getAvailableRoles(); diff --git a/tests/TestCase/Utility/TinyAuthTest.php b/tests/TestCase/Utility/TinyAuthTest.php new file mode 100644 index 00000000..5ab31986 --- /dev/null +++ b/tests/TestCase/Utility/TinyAuthTest.php @@ -0,0 +1,34 @@ + 'DatabaseRoles', + ]; + + $result = (new TinyAuth($config))->getAvailableRoles(); + $expected = [ + 'user' => 11, + 'moderator' => 12, + 'admin' => 13 + ]; + $this->assertEquals($expected, $result); + } + +}