Skip to content

Commit c00c8f8

Browse files
committed
tests: upgrade to phpunit 10
1 parent 8b2e53e commit c00c8f8

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
vendor/
22
composer.lock
3-
.phpunit.result.cache
3+
.phpunit.cache/

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"require-dev": {
3434
"orchestra/testbench": "^8.0",
35-
"phpunit/phpunit": "^9.5.28"
35+
"phpunit/phpunit": "^10.5"
3636
},
3737
"autoload": {
3838
"psr-4": {

phpunit.xml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
backupGlobals="false"
4-
backupStaticAttributes="false"
5-
beStrictAboutTestsThatDoNotTestAnything="false"
4+
beStrictAboutTestsThatDoNotTestAnything="true"
65
bootstrap="vendor/autoload.php"
76
colors="true"
8-
convertErrorsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
convertWarningsToExceptions="true"
11-
convertDeprecationsToExceptions="true"
127
processIsolation="false"
138
stopOnError="false"
149
stopOnFailure="false"
15-
verbose="true"
16-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
10+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
11+
cacheDirectory=".phpunit.cache"
12+
backupStaticProperties="false"
13+
failOnWarning="true"
14+
failOnDeprecation="true"
15+
failOnNotice="true"
1716
>
18-
<coverage>
19-
<include>
20-
<directory suffix=".php">src/</directory>
21-
</include>
22-
</coverage>
17+
<coverage/>
2318
<testsuites>
2419
<testsuite name="Unit">
2520
<directory suffix="Test.php">./tests/Unit/</directory>
@@ -29,6 +24,11 @@
2924
</testsuite>
3025
</testsuites>
3126
<php>
32-
<ini name="error_reporting" value="E_ALL"/>
27+
<ini name="error_reporting" value="E_ALL"/>
3328
</php>
34-
</phpunit>
29+
<source>
30+
<include>
31+
<directory suffix=".php">src/</directory>
32+
</include>
33+
</source>
34+
</phpunit>

tests/Integration/ResourceTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function setUp(): void
6161
/**
6262
* @return array
6363
*/
64-
public function emptyIdProvider(): array
64+
public static function emptyIdProvider(): array
6565
{
6666
return [
6767
[''],
@@ -73,7 +73,7 @@ public function emptyIdProvider(): array
7373
/**
7474
* @return array[]
7575
*/
76-
public function createProvider(): array
76+
public static function createProvider(): array
7777
{
7878
return [
7979
'data:required' => [
@@ -698,7 +698,7 @@ public function createProvider(): array
698698
/**
699699
* @return array
700700
*/
701-
public function updateProvider(): array
701+
public static function updateProvider(): array
702702
{
703703
return [
704704
'data.id:required' => [
@@ -781,7 +781,7 @@ public function updateProvider(): array
781781
/**
782782
* @return array
783783
*/
784-
public function emptyStringProvider(): array
784+
public static function emptyStringProvider(): array
785785
{
786786
return [
787787
[''],
@@ -838,7 +838,7 @@ public function testInvalidJson(): void
838838
/**
839839
* @return array
840840
*/
841-
public function nonObjectProvider(): array
841+
public static function nonObjectProvider(): array
842842
{
843843
return [
844844
['true'],

tests/Integration/ToManyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function setUp(): void
4949
/**
5050
* @return array
5151
*/
52-
public function toManyProvider(): array
52+
public static function toManyProvider(): array
5353
{
5454
return [
5555
'data:required' => [

tests/Integration/ToOneTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function setUp(): void
4949
/**
5050
* @return array
5151
*/
52-
public function toOneProvider(): array
52+
public static function toOneProvider(): array
5353
{
5454
return [
5555
'data:required' => [

0 commit comments

Comments
 (0)