mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:04:02 +00:00
Change @test annotations to #[Test] attributes
This commit is contained in:
parent
f9f28c9d26
commit
5fa5c3b7dd
29 changed files with 179 additions and 165 deletions
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace Stancl\Tenancy\Tests;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedOnDomainException;
|
||||
use Stancl\Tenancy\Resolvers\DomainTenantResolver;
|
||||
use Stancl\Tenancy\Tests\Etc\Tenant;
|
||||
|
|
@ -18,7 +19,7 @@ class CachedTenantResolverTest extends TestCase
|
|||
parent::tearDown();
|
||||
}
|
||||
|
||||
/** @test */
|
||||
#[Test]
|
||||
public function tenants_can_be_resolved_using_the_cached_resolver()
|
||||
{
|
||||
$tenant = Tenant::create();
|
||||
|
|
@ -30,7 +31,7 @@ class CachedTenantResolverTest extends TestCase
|
|||
$this->assertTrue($tenant->is(app(DomainTenantResolver::class)->resolve('acme')));
|
||||
}
|
||||
|
||||
/** @test */
|
||||
#[Test]
|
||||
public function the_underlying_resolver_is_not_touched_when_using_the_cached_resolver()
|
||||
{
|
||||
$tenant = Tenant::create();
|
||||
|
|
@ -55,7 +56,7 @@ class CachedTenantResolverTest extends TestCase
|
|||
$this->assertEmpty(DB::getQueryLog()); // empty
|
||||
}
|
||||
|
||||
/** @test */
|
||||
#[Test]
|
||||
public function cache_is_invalidated_when_the_tenant_is_updated()
|
||||
{
|
||||
$tenant = Tenant::create();
|
||||
|
|
@ -81,7 +82,7 @@ class CachedTenantResolverTest extends TestCase
|
|||
$this->assertNotEmpty(DB::getQueryLog()); // not empty
|
||||
}
|
||||
|
||||
/** @test */
|
||||
#[Test]
|
||||
public function cache_is_invalidated_when_the_tenant_is_deleted()
|
||||
{
|
||||
$tenant = Tenant::create();
|
||||
|
|
@ -108,7 +109,7 @@ class CachedTenantResolverTest extends TestCase
|
|||
$this->assertNotEmpty(DB::getQueryLog()); // not empty - cache cleared so the DB was queried
|
||||
}
|
||||
|
||||
/** @test */
|
||||
#[Test]
|
||||
public function cache_is_invalidated_when_a_tenants_domain_is_changed()
|
||||
{
|
||||
$tenant = Tenant::create();
|
||||
|
|
@ -138,7 +139,7 @@ class CachedTenantResolverTest extends TestCase
|
|||
$this->assertNotEmpty(DB::getQueryLog()); // not empty
|
||||
}
|
||||
|
||||
/** @test */
|
||||
#[Test]
|
||||
public function cache_is_invalidated_when_a_tenants_domain_is_deleted()
|
||||
{
|
||||
$tenant = Tenant::create();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue