Skip to content

Commit f6b95dc

Browse files
Copilotabnegate
andcommitted
Fix testStructureValidationAfterRelationsAttribute for schemaless mode
Skip the test when getSupportForAttributes() is false (schemaless mode) because schemaless databases allow unknown attributes by design, so Structure validation won't reject the 'name' attribute. Co-authored-by: abnegate <5857008+abnegate@users.noreply.github.com>
1 parent 909ad2d commit f6b95dc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/e2e/Adapter/Scopes/RelationshipTests.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,12 @@ public function testStructureValidationAfterRelationsAttribute(): void
11041104
return;
11051105
}
11061106

1107+
if (!$database->getAdapter()->getSupportForAttributes()) {
1108+
// Schemaless mode allows unknown attributes, so structure validation won't reject them
1109+
$this->expectNotToPerformAssertions();
1110+
return;
1111+
}
1112+
11071113
$database->createCollection("structure_1", [], [], [Permission::create(Role::any())]);
11081114
$database->createCollection("structure_2", [], [], [Permission::create(Role::any())]);
11091115

0 commit comments

Comments
 (0)