From 9c63c30cd9bc928632092ddfeb25af298f6a85a1 Mon Sep 17 00:00:00 2001 From: Marco Date: Sat, 29 Jul 2017 18:52:18 +0200 Subject: [PATCH] Add method in 'tests' that creates list of roles for HTML 'select' --- tests/index.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/index.php b/tests/index.php index 88b8ed5..7aff9c5 100644 --- a/tests/index.php +++ b/tests/index.php @@ -500,3 +500,15 @@ function showGuestUserForm() { echo ''; echo ''; } + +function createRolesOptions() { + $roleReflection = new ReflectionClass(\Delight\Auth\Role::class); + + $out = ''; + + foreach ($roleReflection->getConstants() as $roleName => $roleValue) { + $out .= ''; + } + + return $out; +}