From c7d799183659f5244d0f18a8982ab886756d542a Mon Sep 17 00:00:00 2001 From: David Maicher Date: Fri, 22 Sep 2023 11:05:49 +0200 Subject: [PATCH] add test for Logger --- tests/LoggerTest.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/LoggerTest.php diff --git a/tests/LoggerTest.php b/tests/LoggerTest.php new file mode 100644 index 0000000..2206262 --- /dev/null +++ b/tests/LoggerTest.php @@ -0,0 +1,28 @@ +setLogger(new NullLogger()); + $logger->setStopwatch(new Stopwatch()); + + $logger->log(new Request(), null, $this->createMock(Endpoint::class), 0); + $logger->collect(new SymfonyRequest(), new Response()); + + $this->assertSame(1, $logger->getQueryCount()); + $this->assertCount(1, $logger->getQueries()); + } +}