mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-23 06:34:55 +00:00
Small fixes to authorization exception tests
This commit is contained in:
parent
447fec993f
commit
13c17f5dd4
1 changed files with 2 additions and 2 deletions
|
@ -254,7 +254,7 @@ class TestAuthorization extends \PHPUnit\Framework\TestCase {
|
||||||
$tests = [
|
$tests = [
|
||||||
'exists' => [],
|
'exists' => [],
|
||||||
'remove' => [],
|
'remove' => [],
|
||||||
'add' => [],
|
'add' => [''],
|
||||||
'passwordSet' => [''],
|
'passwordSet' => [''],
|
||||||
'propertiesGet' => [],
|
'propertiesGet' => [],
|
||||||
'propertiesSet' => [[]],
|
'propertiesSet' => [[]],
|
||||||
|
@ -278,7 +278,7 @@ class TestAuthorization extends \PHPUnit\Framework\TestCase {
|
||||||
protected function checkExceptions(string $user, $tests): array {
|
protected function checkExceptions(string $user, $tests): array {
|
||||||
$err = [];
|
$err = [];
|
||||||
foreach($tests as $func => $args) {
|
foreach($tests as $func => $args) {
|
||||||
array_unshift($args, $user);
|
if($func != "list") array_unshift($args, $user);
|
||||||
try {
|
try {
|
||||||
call_user_func_array(array($this->data->user, $func), $args);
|
call_user_func_array(array($this->data->user, $func), $args);
|
||||||
} catch(User\ExceptionAuthz $e) {
|
} catch(User\ExceptionAuthz $e) {
|
||||||
|
|
Loading…
Reference in a new issue