1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 17:54:03 +00:00

Merge branch '3.x' into 3.x

This commit is contained in:
Jori Stein 2022-03-08 14:32:43 +01:00 committed by GitHub
commit 3a4cd1bde2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 115 additions and 67 deletions

View file

@ -5,11 +5,13 @@ declare(strict_types=1);
namespace Stancl\Tenancy\Tests;
use Illuminate\Support\Facades\Artisan;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Support\Facades\Route;
use Stancl\Tenancy\Database\Concerns\MaintenanceMode;
use Stancl\Tenancy\Middleware\CheckTenantForMaintenanceMode;
use Stancl\Tenancy\Middleware\InitializeTenancyByDomain;
use Stancl\Tenancy\Tests\Etc\Tenant;
use Symfony\Component\HttpKernel\Exception\ServiceUnavailableHttpException;
class MaintenanceModeTest extends TestCase
{
@ -32,8 +34,9 @@ class MaintenanceModeTest extends TestCase
$tenant->putDownForMaintenance();
$this->get('http://acme.localhost/foo')
->assertStatus(503);
$this->expectException(HttpException::class);
$this->withoutExceptionHandling()
->get('http://acme.localhost/foo');
tenancy()->end();
@ -65,8 +68,9 @@ class MaintenanceModeTest extends TestCase
Artisan::call('tenancy:down');
$this->get('http://acme.localhost/foo')
->assertStatus(503);
$this->expectException(HttpException::class);
$this->withoutExceptionHandling()
->get('http://acme.localhost/foo');
tenancy()->end();