Skip to content

Commit c206a0c

Browse files
committed
feat: initial test for rollbar/rollbar v4, allow phpunit 10
1 parent 124c9e1 commit c206a0c

File tree

6 files changed

+16
-10
lines changed

6 files changed

+16
-10
lines changed

.github/workflows/code_checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
3535

3636
- name: Execute tests
37-
run: vendor/bin/phpunit --verbose
37+
run: vendor/bin/phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/var/
55
!/var/.gitkeep
66
.phpunit.result.cache
7+
.phpunit.cache
78

89
composer.lock
910
clover.xml

Tests/DependencyInjection/RollbarExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testConfigVars(string $var, array $expected, array $loadParamete
3737
/**
3838
* Data provider generatorConfigVars.
3939
*/
40-
public function generatorConfigVars(): array
40+
public static function generatorConfigVars(): array
4141
{
4242
return [
4343
['rollbar.config', ['enabled' => true]],

Tests/Payload/ErrorItemTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testInvoke(int $code, string $message, string $file, int $line,
3636
*
3737
* @throws \Exception
3838
*/
39-
public function generateInvoke(): array
39+
public static function generateInvoke(): array
4040
{
4141
return [
4242
[E_ERROR, 'Error message - ' . microtime(true), __FILE__, random_int(1, 100), 'E_ERROR'],

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"ext-json": "*"
3737
},
3838
"require-dev": {
39-
"phpunit/phpunit": "^9.6",
39+
"phpunit/phpunit": "^9.6|^10.1",
4040
"symfony/framework-bundle": "^5.4|^6.2",
4141
"squizlabs/php_codesniffer": "^3.7",
4242
"matthiasnoback/symfony-dependency-injection-test": "^4.3"

phpunit.xml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!-- https://phpunit.de/manual/current/en/appendixes.configuration.html -->
3-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" colors="true" convertErrorsToExceptions="false" bootstrap="vendor/autoload.php">
4-
<coverage>
5-
<include>
6-
<directory>./</directory>
7-
</include>
8-
</coverage>
3+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
5+
colors="true"
6+
bootstrap="vendor/autoload.php"
7+
cacheDirectory=".phpunit.cache">
8+
<coverage/>
99
<php>
1010
<ini name="error_reporting" value="-1"/>
1111
<server name="APP_ENV" value="test" force="true"/>
@@ -20,4 +20,9 @@
2020
<directory>Tests/</directory>
2121
</testsuite>
2222
</testsuites>
23+
<source>
24+
<include>
25+
<directory>./</directory>
26+
</include>
27+
</source>
2328
</phpunit>

0 commit comments

Comments
 (0)