Skip to content

Commit 21d5fb3

Browse files
committed
test
1 parent 0add3ab commit 21d5fb3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

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

12+
use function json_encode;
13+
use function ob_flush;
14+
15+
use const JSON_PRETTY_PRINT;
16+
1217
class ReadOperationsTest extends TestCase
1318
{
1419
protected function setUp(): void
@@ -198,8 +203,13 @@ public function testQueryLog(): void
198203
Movie::where('imdb.rating', '>', 8.5)->get();
199204

200205
$logs = DB::connection('mongodb')->getQueryLog();
206+
foreach ($logs as $log) {
207+
echo json_encode($log, JSON_PRETTY_PRINT);
208+
}
201209
// end-query-log
202210

211+
ob_flush();
212+
$logs = DB::connection('mongodb')->getQueryLog();
203213
$this->assertNotNull($logs);
204214
}
205215
}

0 commit comments

Comments
 (0)