diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-12-16 16:04:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 16:04:15 +0100 |
commit | bd11879018416d2c5d87728bb0be6ee0cf54451a (patch) | |
tree | f3147ab9eef24ff430c131249166fe84d19a4b07 /tests/plugins/test | |
parent | 8f423eb11c6642d96b5144f56e4698652591ad6b (diff) | |
parent | a6e9c08499f9f79dad88cb3ae9eacda0e0c34c96 (diff) | |
download | Shaarli-bd11879018416d2c5d87728bb0be6ee0cf54451a.tar.gz Shaarli-bd11879018416d2c5d87728bb0be6ee0cf54451a.tar.zst Shaarli-bd11879018416d2c5d87728bb0be6ee0cf54451a.zip |
Merge pull request #1645 from ArthurHoaro/feature/plugin-register-route
Plugin system: allow plugins to provide custom routes
Diffstat (limited to 'tests/plugins/test')
-rw-r--r-- | tests/plugins/test/test.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/plugins/test/test.php b/tests/plugins/test/test.php index 03be4f4e..34cd339e 100644 --- a/tests/plugins/test/test.php +++ b/tests/plugins/test/test.php | |||
@@ -27,3 +27,19 @@ function hook_test_error() | |||
27 | { | 27 | { |
28 | new Unknown(); | 28 | new Unknown(); |
29 | } | 29 | } |
30 | |||
31 | function test_register_routes(): array | ||
32 | { | ||
33 | return [ | ||
34 | [ | ||
35 | 'method' => 'GET', | ||
36 | 'route' => '/test', | ||
37 | 'callable' => 'getFunction', | ||
38 | ], | ||
39 | [ | ||
40 | 'method' => 'POST', | ||
41 | 'route' => '/custom', | ||
42 | 'callable' => 'postFunction', | ||
43 | ], | ||
44 | ]; | ||
45 | } | ||