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 @@ -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
You can’t perform that action at this time.
0 commit comments