mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:24:04 +00:00
Clean up global state in tests
This commit is contained in:
parent
4256b9eba6
commit
f0ff8248e7
1 changed files with 8 additions and 3 deletions
|
|
@ -20,14 +20,19 @@ class RequestDataIdentificationTest extends TestCase
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
InitializeTenancyByRequestData::$header = 'X-Tenant';
|
|
||||||
InitializeTenancyByRequestData::$queryParameter = 'tenant';
|
|
||||||
|
|
||||||
Route::middleware(InitializeTenancyByRequestData::class)->get('/test', function () {
|
Route::middleware(InitializeTenancyByRequestData::class)->get('/test', function () {
|
||||||
return 'Tenant id: ' . tenant('id');
|
return 'Tenant id: ' . tenant('id');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function tearDown(): void
|
||||||
|
{
|
||||||
|
InitializeTenancyByRequestData::$header = 'X-Tenant';
|
||||||
|
InitializeTenancyByRequestData::$queryParameter = 'tenant';
|
||||||
|
|
||||||
|
parent::tearDown();
|
||||||
|
}
|
||||||
|
|
||||||
/** @test */
|
/** @test */
|
||||||
public function header_identification_works()
|
public function header_identification_works()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue