Skip to content

Commit 24f3034

Browse files
committed
PHPUnit 10 upgrade
1 parent e4a0279 commit 24f3034

File tree

6 files changed

+26
-19
lines changed

6 files changed

+26
-19
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
tmp/
33
vendor/
44
.php_cs.cache
5-
.phpunit.result.cache
5+
.phpunit.cache
66
composer.lock

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"require-dev": {
2020
"phpstan/phpstan-phpunit": "^1.0",
21-
"phpunit/phpunit": "^9.5",
21+
"phpunit/phpunit": "^10.1",
2222
"cakephp/cakephp-codesniffer": "^5.0"
2323
},
2424
"extra": {
@@ -55,5 +55,10 @@
5555
"@test",
5656
"@stan-integration"
5757
]
58+
},
59+
"config": {
60+
"allow-plugins": {
61+
"dealerdirect/phpcodesniffer-composer-installer": true
62+
}
5863
}
5964
}

phpunit.xml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
<phpunit
2-
bootstrap="./vendor/autoload.php"
3-
backupGlobals="false"
4-
colors="true"
5-
verbose="true">
1+
<?xml version="1.0"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
bootstrap="./vendor/autoload.php"
4+
backupGlobals="false"
5+
colors="true"
6+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
7+
cacheDirectory=".phpunit.cache">
68

7-
<testsuite name="CakeDCPhpStan">
8-
<directory>./tests</directory>
9-
</testsuite>
9+
<testsuite name="CakeDCPhpStan">
10+
<directory>./tests</directory>
11+
</testsuite>
1012

11-
<filter>
12-
<whitelist>
13-
<directory suffix=".php">./src</directory>
14-
</whitelist>
15-
</filter>
13+
<source>
14+
<include>
15+
<directory suffix=".php">./src</directory>
16+
</include>
17+
</source>
1618
</phpunit>

tests/TestCase/Type/ComponentLoadDynamicReturnTypeExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testGetClass()
3535
*
3636
* @return array
3737
*/
38-
public function dataProviderIsMethodSupported()
38+
public static function dataProviderIsMethodSupported()
3939
{
4040
return [
4141
['loadComponent', true],

tests/TestCase/Type/ShellHelperLoadDynamicReturnTypeExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testGetClassWithCustom()
4747
*
4848
* @return array
4949
*/
50-
public function dataProviderIsMethodSupported()
50+
public static function dataProviderIsMethodSupported()
5151
{
5252
return [
5353
['get', null, false],

tests/TestCase/Type/TableLocatorDynamicReturnTypeExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class TableLocatorDynamicReturnTypeExtensionTest extends TestCase
2323
*
2424
* @return array
2525
*/
26-
public function dataProviderGetClass()
26+
public static function dataProviderGetClass()
2727
{
2828
return [
2929
['Cake\ORM\Locator\LocatorInterface', 'get'],
@@ -49,7 +49,7 @@ public function testGetClass(string $targetClass, string $methodName)
4949
*
5050
* @return array
5151
*/
52-
public function dataProviderIsMethodSupported()
52+
public static function dataProviderIsMethodSupported()
5353
{
5454
return [
5555
['get', 'get', true],

0 commit comments

Comments
 (0)