You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you are using the [CakePHP Authorization plugin](https://github.com/cakephp/authorization), you need to configure TestHelper to bypass authorization checks. Add this to your `config/bootstrap.php`:
This is similar to how DebugKit handles authorization and is necessary to prevent `AuthorizationRequiredException` errors when accessing TestHelper routes.
56
+
47
57
### non-dev mode
48
58
In certain apps it can be useful to have some of the helper functionality available also for staging and prod.
49
59
Here you must make sure then to not load the routes, though:
Copy file name to clipboardExpand all lines: docs/README.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,9 @@ Browse `/test-helper` to see all functionality available.
8
8
- Run tests and display results or coverage in backend.
9
9
10
10
## Configuration
11
-
- TestHelper.command: If you need a custom phpunit command to run with.
12
-
Both `php phpunit.phar` and `vendor/bin/phpunit` work out of the box.
13
-
- TestHelper.coverage: Set to `xdebug` if you have this enabled, it otherwise uses pcov by default.
11
+
-**TestHelper.command**: If you need a custom phpunit command to run with. Both `php phpunit.phar` and `vendor/bin/phpunit` work out of the box.
12
+
-**TestHelper.coverage**: Set to `xdebug` if you have this enabled, it otherwise uses pcov by default.
13
+
-**TestHelper.ignoreAuthorization**: Set to `true` to bypass authorization checks when using the CakePHP Authorization plugin. Default: `false`.
14
14
15
15
### Your own template
16
16
The default template ships with bootstrap (5) and fontawesome icons.
@@ -21,6 +21,16 @@ Overwrite the `test_cases` element if you want to support e.g. foundation and th
21
21
22
22
## Troubleshooting
23
23
24
+
### Authorization Plugin Errors
25
+
26
+
If you are using the [CakePHP Authorization plugin](https://github.com/cakephp/authorization) and encounter `AuthorizationRequiredException` errors when accessing TestHelper routes, add this to your `config/bootstrap.php`:
0 commit comments