X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fplugins%2Ftest%2Ftest.php;h=03be4f4e8c997bd9eb875ad1f42a65bf4d294eb7;hb=4af591ff3c5db4dea5b6c437527f6f9b12917570;hp=3d750c902195dc2a0d3bfdf13687a0c2c5bc3eba;hpb=fd006c630b64146edc402b68d8503c716f8a55d6;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/plugins/test/test.php b/tests/plugins/test/test.php index 3d750c90..03be4f4e 100644 --- a/tests/plugins/test/test.php +++ b/tests/plugins/test/test.php @@ -11,11 +11,19 @@ function hook_test_random($data) { if (isset($data['_PAGE_']) && $data['_PAGE_'] == 'test') { $data[1] = 'page test'; - } else if (isset($data['_LOGGEDIN_']) && $data['_LOGGEDIN_'] === true) { + } elseif (isset($data['_LOGGEDIN_']) && $data['_LOGGEDIN_'] === true) { $data[1] = 'loggedin'; + } elseif (array_key_exists('_LOGGEDIN_', $data)) { + $data[1] = 'loggedin'; + $data[2] = $data['_LOGGEDIN_']; } else { $data[1] = $data[0]; } return $data; } + +function hook_test_error() +{ + new Unknown(); +}