diff --git a/tests/e2e/Services/Storage/StorageBase.php b/tests/e2e/Services/Storage/StorageBase.php index be0a13f1e..cae036c30 100644 --- a/tests/e2e/Services/Storage/StorageBase.php +++ b/tests/e2e/Services/Storage/StorageBase.php @@ -300,7 +300,7 @@ trait StorageBase //$this->assertNotEmpty($file1['body']['fileOpenSSLTag']); //$this->assertNotEmpty($file1['body']['fileOpenSSLIV']); $this->assertIsArray($file1['body']['$permissions']); - $this->assertCount(2, $file1['body']['$permissions']); + $this->assertCount(4, $file1['body']['$permissions']); $file2 = $this->client->call(Client::METHOD_GET, '/storage/buckets/' . $bucketId . '/files/' . $data['fileId'] . '/preview', array_merge([ 'content-type' => 'application/json', @@ -604,7 +604,7 @@ trait StorageBase //$this->assertNotEmpty($file['body']['fileOpenSSLTag']); //$this->assertNotEmpty($file['body']['fileOpenSSLIV']); $this->assertIsArray($file['body']['$permissions']); - $this->assertCount(2, $file['body']['$permissions']); + $this->assertCount(4, $file['body']['$permissions']); /** * Test for FAILURE unknown Bucket diff --git a/tests/e2e/Services/Storage/StorageCustomClientTest.php b/tests/e2e/Services/Storage/StorageCustomClientTest.php index 0d49aae66..f77c2ee94 100644 --- a/tests/e2e/Services/Storage/StorageCustomClientTest.php +++ b/tests/e2e/Services/Storage/StorageCustomClientTest.php @@ -185,7 +185,11 @@ class StorageCustomClientTest extends Scope 'fileId' => 'unique()', 'file' => new CURLFile(realpath(__DIR__ . '/../../../resources/logo.png'), 'image/png', 'permissions.png'), 'folderId' => 'xyz', - 'write' => ['user:notme'] + 'permissions' => [ + 'create(user:notme)', + 'update(user:notme)', + 'delete(user:notme)', + ] ]); $this->assertEquals($file['headers']['status-code'], 400); @@ -243,7 +247,11 @@ class StorageCustomClientTest extends Scope 'content-type' => 'application/json', 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'write' => ['user:notme'] + 'permissions' => [ + 'create(user:notme)', + 'update(user:notme)', + 'delete(user:notme)', + ] ]); $this->assertEquals($file['headers']['status-code'], 400); diff --git a/tests/unit/Messaging/MessagingTest.php b/tests/unit/Messaging/MessagingTest.php index 2fdccbda7..134bff931 100644 --- a/tests/unit/Messaging/MessagingTest.php +++ b/tests/unit/Messaging/MessagingTest.php @@ -227,8 +227,6 @@ class MessagingTest extends TestCase ]) ); - \var_dump($result); - $this->assertContains('any', $result['roles']); $this->assertNotContains('role:admin', $result['roles']);