Skip to content

Commit 0add3ab

Browse files
committed
test
1 parent 59e3f03 commit 0add3ab

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

Diff for: docs/fundamentals/read-operations/query-logging.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ prints the query log:
5555
.. output::
5656
:language: json
5757
:visible: false
58-
58+
5959
{
6060
"query": "{ \"find\" : \"movies\", \"filter\" : { \"title\" : \"Carrie\" } }",
6161
"bindings": [],

Diff for: docs/includes/fundamentals/read-operations/ReadOperationsTest.php

+1-7
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
use MongoDB\Driver\ReadPreference;
1010
use MongoDB\Laravel\Tests\TestCase;
1111

12-
use function json_encode;
13-
1412
class ReadOperationsTest extends TestCase
1513
{
1614
protected function setUp(): void
@@ -200,12 +198,8 @@ public function testQueryLog(): void
200198
Movie::where('imdb.rating', '>', 8.5)->get();
201199

202200
$logs = DB::connection('mongodb')->getQueryLog();
203-
foreach ($logs as $log) {
204-
echo json_encode($log);
205-
}
206-
207201
// end-query-log
208202

209-
$this->expectOutputRegex('');
203+
$this->assertNotNull($logs);
210204
}
211205
}

0 commit comments

Comments
 (0)