Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rustagir committed Aug 1, 2024
1 parent d100ac9 commit 8a1b222
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/includes/query-builder/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,15 @@ public function testUpsert(): void
['title' => 'Petit Maman', 'recommended' => 'true', 'runtime' => '72'],
],
'title',
'runtime',
'recommended',
);
// end upsert

$this->assertSame(2, $result);

$this->assertSame(119, DB::collection('movies')->where('title', 'Inspector Maigret')->first()['runtime']);
$this->assertSame(false, DB::collection('movies')->where('title', 'Inspector Maigret')->first()['recommended']);

$this->assertSame(true, DB::collection('movies')->where('title', 'Petit Maman')->first()['recommended']);
$this->assertSame(72, DB::collection('movies')->where('title', 'Petit Maman')->first()['runtime']);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/query-builder.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ to update or insert documents based on the following instructions:
- Indicate that the ``title`` field uniquely identifies documents in the
scope of your operation.

- Update only the ``runtime`` field in matched documents.
- Update only the ``recommended`` field in matched documents.

.. literalinclude:: /includes/query-builder/QueryBuilderTest.php
:language: php
Expand Down

0 comments on commit 8a1b222

Please sign in to comment.