From 8ab5154130fae837ff8366c229925d3f767970a4 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Sun, 25 Sep 2022 03:43:07 +0800 Subject: [PATCH] 1. authorization helper 2. change unit test to run on memory --- phpunit.xml | 3 ++- src/Common/Infrastructure/helpers.php | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/Common/Infrastructure/helpers.php diff --git a/phpunit.xml b/phpunit.xml index 49661e5..370faf0 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -21,7 +21,8 @@ - + + diff --git a/src/Common/Infrastructure/helpers.php b/src/Common/Infrastructure/helpers.php new file mode 100644 index 0000000..0c56e92 --- /dev/null +++ b/src/Common/Infrastructure/helpers.php @@ -0,0 +1,16 @@ +{$ability}(...$arguments)) { + return true; + } + throw new UnauthorizedUserException(); + } +}