]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/plugins/test/test.php
Merge pull request #1616 from dimtion/fix-api-redirect
[github/shaarli/Shaarli.git] / tests / plugins / test / test.php
index 3d750c902195dc2a0d3bfdf13687a0c2c5bc3eba..03be4f4e8c997bd9eb875ad1f42a65bf4d294eb7 100644 (file)
@@ -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();
+}