Skip to content

Commit

Permalink
Update phpunit to ^10.5, fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
muuk-iO committed Feb 3, 2025
1 parent 8e06bb0 commit d429773
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"phpcompatibility/php-compatibility": "^9.3"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^10.5",
"phpstan/phpstan": "^2.1",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan-strict-rules": "^2.0"
Expand Down
13 changes: 9 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@
<phpunit
bootstrap="vendor/autoload.php"
colors="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
displayDetailsOnPhpunitDeprecations="true"
>
<testsuites>
<testsuite name="iO Coding Standard Tests">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<source>
<include>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</include>
</source>
</phpunit>
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function testBad(string $fileName, string $tokenName): void
}

/** @return array<array<mixed>> */
public function goodDataProvider(): array
public static function goodDataProvider(): array
{
return [
['MethodPerClassLimitGood.inc', ],
Expand All @@ -58,7 +58,7 @@ public function goodDataProvider(): array
}

/** @return array<array<mixed>> */
public function badDataProvider(): array
public static function badDataProvider(): array
{
return [
['MethodPerClassLimitBad.inc', 'class', ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function testBad(string $fileName, string $tokenName): void
}

/** @return array<array<mixed>> */
public function goodDataProvider(): array
public static function goodDataProvider(): array
{
return [
['PropertyPerClassLimitGood.inc', ],
Expand All @@ -57,7 +57,7 @@ public function goodDataProvider(): array
}

/** @return array<array<mixed>> */
public function badDataProvider(): array
public static function badDataProvider(): array
{
return [
['PropertyPerClassLimitBad.inc', 'class', ],
Expand Down

0 comments on commit d429773

Please sign in to comment.