diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2da7a8f..da541b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,8 @@ jobs: - php: 8.0 - php: 8.1 - php: 8.2 + SYMFONY_REQUIRE: 7.0.* + stability: dev steps: - uses: actions/checkout@v2 diff --git a/composer.json b/composer.json index 5b128b9..830eb5d 100644 --- a/composer.json +++ b/composer.json @@ -12,12 +12,12 @@ ], "require": { "php": "^7.3 || ^8.0", - "symfony/framework-bundle": "^5.4 || ^6.2", + "symfony/framework-bundle": "^5.4 || ^6.2 || ^7.0", "solarium/solarium": "^6.2" }, "require-dev": { - "symfony/phpunit-bridge": "^6.2", - "symfony/stopwatch": "^5.4 || ^6.2" + "symfony/phpunit-bridge": "^6.3", + "symfony/stopwatch": "^5.4 || ^6.2 || ^7.0" }, "autoload": { "psr-4": { 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()); + } +}