diff --git a/.github/workflows/code_checks.yaml b/.github/workflows/code_checks.yaml index b37e54d..827fa38 100644 --- a/.github/workflows/code_checks.yaml +++ b/.github/workflows/code_checks.yaml @@ -34,4 +34,4 @@ jobs: run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: Execute tests - run: vendor/bin/phpunit --verbose + run: vendor/bin/phpunit diff --git a/.gitignore b/.gitignore index 546b65c..1f47029 100755 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /var/ !/var/.gitkeep .phpunit.result.cache +.phpunit.cache composer.lock clover.xml \ No newline at end of file diff --git a/Tests/DependencyInjection/RollbarExtensionTest.php b/Tests/DependencyInjection/RollbarExtensionTest.php index abe9293..64f8d46 100755 --- a/Tests/DependencyInjection/RollbarExtensionTest.php +++ b/Tests/DependencyInjection/RollbarExtensionTest.php @@ -37,7 +37,7 @@ public function testConfigVars(string $var, array $expected, array $loadParamete /** * Data provider generatorConfigVars. */ - public function generatorConfigVars(): array + public static function generatorConfigVars(): array { return [ ['rollbar.config', ['enabled' => true]], diff --git a/Tests/Fixtures/App/config/config.yml b/Tests/Fixtures/App/config/config.yml index 4fbf716..bbaeb5d 100755 --- a/Tests/Fixtures/App/config/config.yml +++ b/Tests/Fixtures/App/config/config.yml @@ -5,7 +5,7 @@ parameters: framework: test: true - secret: "%secret%" + secret: "%secret%" router: resource: "%kernel.project_dir%/config/routing.yml" strict_requirements: ~ diff --git a/Tests/Fixtures/ErrorHandler.php b/Tests/Fixtures/ErrorHandler.php deleted file mode 100755 index c8e4ef3..0000000 --- a/Tests/Fixtures/ErrorHandler.php +++ /dev/null @@ -1,42 +0,0 @@ -assert = $assert; - } - - /** - * Writes the record down to the log of the implementing handler - */ - protected function write(array $record): void - { - $dummy = static function () { - }; - - $closure = empty($this->assert) ? $dummy : $this->assert; - $closure($record); - } -} diff --git a/Tests/Payload/ErrorItemTest.php b/Tests/Payload/ErrorItemTest.php index ba85910..14d4c38 100755 --- a/Tests/Payload/ErrorItemTest.php +++ b/Tests/Payload/ErrorItemTest.php @@ -36,7 +36,7 @@ public function testInvoke(int $code, string $message, string $file, int $line, * * @throws \Exception */ - public function generateInvoke(): array + public static function generateInvoke(): array { return [ [E_ERROR, 'Error message - ' . microtime(true), __FILE__, random_int(1, 100), 'E_ERROR'], diff --git a/composer.json b/composer.json index 024e9d7..9055b44 100755 --- a/composer.json +++ b/composer.json @@ -21,25 +21,24 @@ }, "autoload-dev": { "files": [ - "Tests/Fixtures/App/AppKernel.php", - "Tests/Fixtures/ErrorHandler.php" + "Tests/Fixtures/App/AppKernel.php" ], "psr-4": { "Tests\\": "Tests/"} }, "require": { "php": ">=8.0.2", - "rollbar/rollbar": "^3.1", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/config": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/monolog-bundle": "^3.0", - "symfony/serializer": "^5.4|^6.0", + "rollbar/rollbar": "^3.1|^4.0", + "symfony/dependency-injection": "^5.4|^6.2", + "symfony/config": "^5.4|^6.2", + "symfony/http-kernel": "^5.4|^6.2", + "symfony/monolog-bundle": "^3.8", + "symfony/serializer": "^5.4|^6.2", "ext-json": "*" }, "require-dev": { - "phpunit/phpunit": "^9.5", - "symfony/framework-bundle": "^5.4|^6.0", - "squizlabs/php_codesniffer": "^3.6", + "phpunit/phpunit": "^9.6|^10.1", + "symfony/framework-bundle": "^5.4|^6.2", + "squizlabs/php_codesniffer": "^3.7", "matthiasnoback/symfony-dependency-injection-test": "^4.3" }, "scripts": { diff --git a/phpunit.xml b/phpunit.xml index 9fb371f..b1d3551 100755 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,11 +1,11 @@ - - - - ./ - - + + @@ -20,4 +20,9 @@ Tests/ + + + ./ + +