Skip to content

Commit

Permalink
Make it clear that inplace increase uses existing + new value
Browse files Browse the repository at this point in the history
  • Loading branch information
abnegate committed Jan 23, 2025
1 parent fb3fc21 commit 5928843
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/e2e/Adapter/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -2441,6 +2441,9 @@ public function testCreateOrUpdateDocumentsWithInplaceIncrease(): void

static::getDatabase()->createDocuments($collection, $documents);

$documents[0]->setAttribute('integer', 1);
$documents[1]->setAttribute('integer', 1);

static::getDatabase()->createOrUpdateDocumentsWithInplaceIncrease(
collection: $collection,
attribute:'integer',
Expand All @@ -2450,7 +2453,7 @@ public function testCreateOrUpdateDocumentsWithInplaceIncrease(): void
$documents = static::getDatabase()->find($collection);

foreach ($documents as $document) {
$this->assertEquals(10, $document->getAttribute('integer'));
$this->assertEquals(6, $document->getAttribute('integer'));
}
}

Expand Down

0 comments on commit 5928843

Please sign in to comment.