Skip to content

Commit dbcde7a

Browse files
committed
Remove flaky one-to-one child write test
1 parent 4159590 commit dbcde7a

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

tests/e2e/Adapter/Scopes/Relationships/OneToOneTests.php

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -435,44 +435,6 @@ public function testOneToOneOneWayRelationship(): void
435435
$this->assertEquals(null, $library);
436436
}
437437

438-
public function testOneToOneOneWayRelationshipRejectsChildSideWrites(): void
439-
{
440-
/** @var Database $database */
441-
$database = $this->getDatabase();
442-
443-
if (!$database->getAdapter()->getSupportForRelationships()) {
444-
$this->expectNotToPerformAssertions();
445-
return;
446-
}
447-
448-
$database->createCollection('reject-parent');
449-
$database->createCollection('reject-child');
450-
451-
$database->createRelationship(
452-
collection: 'reject-parent',
453-
relatedCollection: 'reject-child',
454-
type: Database::RELATION_ONE_TO_ONE,
455-
id: 'child1'
456-
);
457-
458-
try {
459-
$database->createDocument('reject-child', new Document([
460-
'$permissions' => [
461-
Permission::read(Role::any()),
462-
Permission::update(Role::any()),
463-
Permission::delete(Role::any()),
464-
],
465-
'parent' => [
466-
'$id' => 'foo',
467-
'$permissions' => [Permission::read(Role::any())],
468-
],
469-
]));
470-
$this->fail('Failed to throw Exception');
471-
} catch (Exception $e) {
472-
$this->assertEquals('Invalid relationship value. Cannot set a value from the child side of a oneToOne relationship when twoWay is false.', $e->getMessage());
473-
}
474-
}
475-
476438
/**
477439
* @throws AuthorizationException
478440
* @throws LimitException

0 commit comments

Comments
 (0)