mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:24:03 +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
|
|
@ -123,11 +123,11 @@ test('single domain tenant can be identified by domain or subdomain', function (
|
|||
expect(tenant('id'))->toBe($tenant->id);
|
||||
})->with([
|
||||
[
|
||||
'domain' => 'acme.localhost',
|
||||
'identification middleware' => [PreventAccessFromUnwantedDomains::class, InitializeTenancyByDomain::class],
|
||||
'acme.localhost', // Domain
|
||||
[PreventAccessFromUnwantedDomains::class, InitializeTenancyByDomain::class], // Identification middleware
|
||||
],
|
||||
[
|
||||
'subdomain' => 'acme',
|
||||
'identification middleware' => [PreventAccessFromUnwantedDomains::class, InitializeTenancyBySubdomain::class],
|
||||
'acme', // Subdomain
|
||||
[PreventAccessFromUnwantedDomains::class, InitializeTenancyBySubdomain::class], // Identification middleware
|
||||
],
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue