Skip to content

Commit 2148821

Browse files
Merge branch 'main' into fix-create-documents-nulls
2 parents 2c1a66d + 92a9909 commit 2148821

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/e2e/Adapter/Base.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2434,6 +2434,21 @@ public function testCreateOrUpdateDocumentsWithIncrease(): void
24342434
foreach ($documents as $document) {
24352435
$this->assertEquals(6, $document->getAttribute('integer'));
24362436
}
2437+
2438+
$documents[0]->setAttribute('integer', -1);
2439+
$documents[1]->setAttribute('integer', -1);
2440+
2441+
static::getDatabase()->createOrUpdateDocumentsWithIncrease(
2442+
collection: $collection,
2443+
attribute:'integer',
2444+
documents: $documents
2445+
);
2446+
2447+
$documents = static::getDatabase()->find($collection);
2448+
2449+
foreach ($documents as $document) {
2450+
$this->assertEquals(5, $document->getAttribute('integer'));
2451+
}
24372452
}
24382453

24392454
public function testCreateOrUpdateDocumentsPermissions(): void

0 commit comments

Comments
 (0)