mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 11:14:04 +00:00
Improve early identification tests (#66)
* Separate route-level domain identification test from path/request to improve readability WIP * Get rid of confusing datasets in route-level identifcation tests * Clean up updated tests * Simplify early id tests * Reduce dataset duplication * Improve test readability, fix false positive, polish details * Separate early ID test from defaulting test (WIP) * Finish improving and correcting the early identification/default route mode tests * Make flag/default mode usage more clear by improving the docblock in DealsWithRouteContexts * Fix PHPUnit deprecation warnings * code review * code review --------- Co-authored-by: Samuel Štancl <samuel@archte.ch>
This commit is contained in:
parent
48b916e182
commit
cb0d7e2902
7 changed files with 248 additions and 147 deletions
|
|
@ -331,19 +331,19 @@ class CustomInitializeTenancyByPath extends InitializeTenancyByPath
|
|||
|
||||
dataset('path identification types', [
|
||||
'kernel identification' => [
|
||||
'route_middleware' => ['universal'],
|
||||
'global_middleware' => [InitializeTenancyByPath::class],
|
||||
['universal'], // Route middleware
|
||||
[InitializeTenancyByPath::class], // Global Global middleware
|
||||
],
|
||||
'route-level identification' => [
|
||||
'route_middleware' => ['universal', InitializeTenancyByPath::class],
|
||||
'global_middleware' => [],
|
||||
['universal', InitializeTenancyByPath::class], // Route middleware
|
||||
[], // Global middleware
|
||||
],
|
||||
'kernel identification + defaulting to universal routes' => [
|
||||
'route_middleware' => [],
|
||||
'global_middleware' => ['universal', InitializeTenancyByPath::class],
|
||||
[], // Route middleware
|
||||
['universal', InitializeTenancyByPath::class], // Global middleware
|
||||
],
|
||||
'route-level identification + defaulting to universal routes' => [
|
||||
'route_middleware' => [InitializeTenancyByPath::class],
|
||||
'global_middleware' => ['universal'],
|
||||
[InitializeTenancyByPath::class], // Route middleware
|
||||
['universal'], // Global middleware
|
||||
],
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue