mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 18:24: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
|
|
@ -93,8 +93,14 @@ test('central helper can be used in tenant requests', function (bool $enabled, b
|
|||
}
|
||||
}
|
||||
})->with([
|
||||
['enabled' => false, 'shouldThrow' => true],
|
||||
['enabled' => true, 'shouldThrow' => false],
|
||||
[
|
||||
false, // Disabled
|
||||
true // Should throw
|
||||
],
|
||||
[
|
||||
true, // Enabled
|
||||
false // Should not throw
|
||||
],
|
||||
]);
|
||||
|
||||
test('tenant run helper can be used on central requests', function (bool $enabled, bool $shouldThrow) {
|
||||
|
|
@ -140,6 +146,12 @@ test('tenant run helper can be used on central requests', function (bool $enable
|
|||
}
|
||||
}
|
||||
})->with([
|
||||
['enabled' => false, 'shouldThrow' => true],
|
||||
['enabled' => true, 'shouldThrow' => false],
|
||||
[
|
||||
false, // Disabled
|
||||
true // Should throw
|
||||
],
|
||||
[
|
||||
true, // Enabled
|
||||
false // Should not throw
|
||||
],
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue