From c9641f72a829ce7490fd419f5e4c2b663228697b Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 19 Aug 2025 23:02:17 +1200 Subject: [PATCH] Remove invalid test --- .../Databases/Legacy/DatabasesBase.php | 49 ------------------- 1 file changed, 49 deletions(-) diff --git a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php index 8b415127ba..718d69197e 100644 --- a/tests/e2e/Services/Databases/Legacy/DatabasesBase.php +++ b/tests/e2e/Services/Databases/Legacy/DatabasesBase.php @@ -5245,55 +5245,6 @@ trait DatabasesBase $this->assertArrayNotHasKey('libraries', $response['body']); } - /** - * @depends testOneToManyRelationship - */ - public function testCollectionIdAttributeConsistency(array $data): void - { - // Test that when NO select query is used, $collectionId is present (not $tableId) - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'queries' => [ - Query::equal('fullName', ['Stevie Wonder'])->toString(), - ], - ]); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertCount(1, $response['body']['documents']); - - $document = $response['body']['documents'][0]; - // Verify correct Collections API attributes are present - $this->assertArrayHasKey('$collectionId', $document, 'Collections API should set $collectionId, not $tableId'); - $this->assertArrayHasKey('$databaseId', $document); - $this->assertArrayNotHasKey('$tableId', $document, 'Collections API should not have $tableId'); - - // Test that when $collectionId is explicitly requested in select, it's present - $response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents', array_merge([ - 'content-type' => 'application/json', - 'x-appwrite-project' => $this->getProject()['$id'], - ], $this->getHeaders()), [ - 'queries' => [ - Query::equal('fullName', ['Stevie Wonder'])->toString(), - Query::select(['fullName', '$collectionId', '$databaseId'])->toString(), - ], - ]); - - $this->assertEquals(200, $response['headers']['status-code']); - $this->assertCount(1, $response['body']['documents']); - - $document = $response['body']['documents'][0]; - $this->assertArrayHasKey('$collectionId', $document, 'Explicitly requested $collectionId should be present'); - $this->assertArrayHasKey('$databaseId', $document, 'Explicitly requested $databaseId should be present'); - $this->assertArrayHasKey('fullName', $document); - $this->assertArrayNotHasKey('$tableId', $document, 'Collections API should never have $tableId'); - - // Verify the correct value is set - $this->assertEquals($data['personCollection'], $document['$collectionId'], '$collectionId should contain the collection ID'); - $this->assertEquals($data['databaseId'], $document['$databaseId'], '$databaseId should contain the database ID'); - } - /** * @throws \Utopia\Database\Exception * @throws \Utopia\Database\Exception\Query