mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
singletone fix
This commit is contained in:
@@ -24,7 +24,9 @@ class DatabasesPermissionsGuestTest extends Scope
|
||||
if (isset($this->authorization)) {
|
||||
return $this->authorization;
|
||||
}
|
||||
return new Authorization();
|
||||
|
||||
$this->authorization = new Authorization();
|
||||
return $this->authorization;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,14 +20,16 @@ class AuthTest extends TestCase
|
||||
if (isset($this->authorization)) {
|
||||
return $this->authorization;
|
||||
}
|
||||
return new Authorization();
|
||||
|
||||
$this->authorization = new Authorization();
|
||||
return $this->authorization;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reset Roles
|
||||
*/
|
||||
public function tearDown(): void
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->getAuthorization()->cleanRoles();
|
||||
$this->getAuthorization()->addRole(Role::any()->toString());
|
||||
|
||||
@@ -35,6 +35,7 @@ class MessagingChannelsTest extends TestCase
|
||||
'functions.1',
|
||||
];
|
||||
|
||||
|
||||
private $authorization;
|
||||
|
||||
public function getAuthorization(): Authorization
|
||||
@@ -42,7 +43,9 @@ class MessagingChannelsTest extends TestCase
|
||||
if (isset($this->authorization)) {
|
||||
return $this->authorization;
|
||||
}
|
||||
return new Authorization();
|
||||
|
||||
$this->authorization = new Authorization();
|
||||
return $this->authorization;
|
||||
}
|
||||
|
||||
public function setUp(): void
|
||||
|
||||
Reference in New Issue
Block a user