File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -2396,6 +2396,21 @@ public function testCreateOrUpdateDocumentsWithIncrease(): void
23962396 foreach ($documents as $document) {
23972397 $this->assertEquals(6, $document->getAttribute('integer'));
23982398 }
2399+
2400+ $documents[0]->setAttribute('integer', -1);
2401+ $documents[1]->setAttribute('integer', -1);
2402+
2403+ static::getDatabase()->createOrUpdateDocumentsWithIncrease(
2404+ collection: $collection,
2405+ attribute:'integer',
2406+ documents: $documents
2407+ );
2408+
2409+ $documents = static::getDatabase()->find($collection);
2410+
2411+ foreach ($documents as $document) {
2412+ $this->assertEquals(5, $document->getAttribute('integer'));
2413+ }
23992414 }
24002415
24012416 public function testCreateOrUpdateDocumentsPermissions(): void
You can’t perform that action at this time.
0 commit comments