Skip to content

Commit e3577cd

Browse files
committed
Upgrade phpunit to version ^10.5
1 parent fd7b6df commit e3577cd

4 files changed

Lines changed: 28 additions & 25 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ build/
44
raw-tests/
55
vendor/
66
.php-cs-fixer.cache
7+
.phpunit.cache
78
.phpunit.result.cache
89
composer.lock
910
composer.phar

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"jetbrains/phpstorm-attributes": "^1.0",
4646
"phpmd/phpmd": "^2.13",
4747
"phpstan/phpstan": "^1.9",
48-
"phpunit/phpunit": "^9.5"
48+
"phpunit/phpunit": "^10.5"
4949
},
5050
"minimum-stability": "dev",
5151
"prefer-stable": true,

phpunit.xml.dist

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false"
3-
bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true"
4-
convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnError="false"
3+
bootstrap="vendor/autoload.php" colors="true" stopOnError="false"
54
stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false"
6-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
7-
<coverage processUncoveredFiles="true">
8-
<include>
9-
<directory suffix=".php">src</directory>
10-
</include>
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
6+
cacheDirectory=".phpunit.cache">
7+
<coverage>
118
<report>
129
<clover outputFile="build/coverage/clover.xml"/>
1310
<html outputDirectory="build/coverage"/>
@@ -27,4 +24,9 @@
2724
<env name="DB_SCHEMA" value="framework-tests"/>
2825
<env name="XDEBUG_MODE" value="coverage"/>
2926
</php>
27+
<source>
28+
<include>
29+
<directory suffix=".php">src</directory>
30+
</include>
31+
</source>
3032
</phpunit>

tests/Result/FieldTest.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,26 @@
1414

1515
final class FieldTest extends TestCase
1616
{
17+
/**
18+
* @param int $type
19+
* @param string|null $typeName
20+
*
21+
* @dataProvider typeProvider
22+
*/
23+
public function testType(int $type, ?string $typeName) : void
24+
{
25+
$object = new \stdClass();
26+
$object->flags = $type;
27+
$object->type = $type;
28+
$field = new Field($object);
29+
self::assertSame($type, $field->type);
30+
self::assertSame($typeName, $field->typeName);
31+
}
32+
1733
/**
1834
* @return array<array<mixed>>
1935
*/
20-
public function typeProvider() : array
36+
public static function typeProvider() : array
2137
{
2238
return [
2339
[\MYSQLI_TYPE_BIT, 'bit'],
@@ -52,20 +68,4 @@ public function typeProvider() : array
5268
[-1, null],
5369
];
5470
}
55-
56-
/**
57-
* @param int $type
58-
* @param string|null $typeName
59-
*
60-
* @dataProvider typeProvider
61-
*/
62-
public function testType(int $type, ?string $typeName) : void
63-
{
64-
$object = new \stdClass();
65-
$object->flags = $type;
66-
$object->type = $type;
67-
$field = new Field($object);
68-
self::assertSame($type, $field->type);
69-
self::assertSame($typeName, $field->typeName);
70-
}
7171
}

0 commit comments

Comments
 (0)