Add debug

This commit is contained in:
fogelito
2025-02-05 08:56:33 +02:00
parent 535afc4b73
commit 19e8cded14
2 changed files with 25 additions and 11 deletions
+4
View File
@@ -49,6 +49,10 @@ trait ProjectCustom
'url' => 'https://appwrite.io',
]);
if($project['headers']['status-code'] != 201){
var_dump($project);
}
$this->assertEquals(201, $project['headers']['status-code']);
$this->assertNotEmpty($project['body']);
@@ -22,19 +22,29 @@ class DatabasesPermissionsGuestTest extends Scope
public function createCollection(): array
{
$this->assertEventually(function () use (&$database) {
$database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'databaseId' => ID::unique(),
'name' => 'InvalidDocumentDatabase',
]);
// $this->assertEventually(function () use (&$database) {
// $database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([
// 'content-type' => 'application/json',
// 'x-appwrite-project' => $this->getProject()['$id'],
// 'x-appwrite-key' => $this->getProject()['apiKey']
// ]), [
// 'databaseId' => ID::unique(),
// 'name' => 'InvalidDocumentDatabase',
// ]);
//
// $this->assertEquals(201, $database['headers']['status-code']);
// }, 50000, 500);
$this->assertEquals(201, $database['headers']['status-code']);
}, 50000, 500);
$database = $this->client->call(Client::METHOD_POST, '/databases', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'databaseId' => ID::unique(),
'name' => 'InvalidDocumentDatabase',
]);
$this->assertEquals(201, $database['headers']['status-code']);
$this->assertEquals('InvalidDocumentDatabase', $database['body']['name']);
$databaseId = $database['body']['$id'];