Skip to content

Commit 01aa76a

Browse files
committed
tests: upgrade to phpunit 10
1 parent 2b23f11 commit 01aa76a

File tree

13 files changed

+39
-39
lines changed

13 files changed

+39
-39
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
@@ -31,7 +31,7 @@
3131
},
3232
"require-dev": {
3333
"orchestra/testbench": "^8.0",
34-
"phpunit/phpunit": "^9.5.28"
34+
"phpunit/phpunit": "^10.5"
3535
},
3636
"autoload": {
3737
"psr-4": {

phpunit.xml

Lines changed: 13 additions & 13 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"
54
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/lib/Unit/</directory>
@@ -35,4 +30,9 @@
3530
<ini name="error_reporting" value="E_ALL"/>
3631
<env name="DB_CONNECTION" value="testing"/>
3732
</php>
38-
</phpunit>
33+
<source>
34+
<include>
35+
<directory suffix=".php">src/</directory>
36+
</include>
37+
</source>
38+
</phpunit>

tests/lib/Acceptance/EagerLoading/EagerLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class EagerLoaderTest extends TestCase
3131
/**
3232
* @return array[]
3333
*/
34-
public function includePathsProvider(): array
34+
public static function includePathsProvider(): array
3535
{
3636
return [
3737
// 'images' => [

tests/lib/Acceptance/Relations/MorphTo/QueryTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class QueryTest extends TestCase
3333
/**
3434
* @return array
3535
*/
36-
public function modelProvider(): array
36+
public static function modelProvider(): array
3737
{
3838
return [
3939
'post' => [Post::class],
@@ -72,7 +72,7 @@ public function testEmpty(): void
7272
/**
7373
* @return array
7474
*/
75-
public function includePathProvider(): array
75+
public static function includePathProvider(): array
7676
{
7777
return [
7878
'post' => [Post::class, 'author,country', 'user'],
@@ -105,7 +105,7 @@ public function testWithIncludePaths(string $modelClass, string $path, string $r
105105
/**
106106
* @return array
107107
*/
108-
public function defaultEagerLoadProvider(): array
108+
public static function defaultEagerLoadProvider(): array
109109
{
110110
return [
111111
'post' => [PostSchema::class, Post::class, 'user'],

tests/lib/Acceptance/SoftDeleteTest.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 trashedProvider(): array
52+
public static function trashedProvider(): array
5353
{
5454
return [
5555
'trashed' => [new Carbon()],

tests/lib/Integration/Fields/ArrayHashTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testSortable(): void
7878
/**
7979
* @return array
8080
*/
81-
public function validProvider(): array
81+
public static function validProvider(): array
8282
{
8383
return [
8484
[[]],
@@ -105,7 +105,7 @@ public function testFill($value): void
105105
/**
106106
* @return array
107107
*/
108-
public function invalidProvider(): array
108+
public static function invalidProvider(): array
109109
{
110110
return [
111111
[true],
@@ -484,7 +484,7 @@ public function testReadOnlyOnUpdate(): void
484484
/**
485485
* @return array
486486
*/
487-
public function serializeProvider(): array
487+
public static function serializeProvider(): array
488488
{
489489
return [
490490
[null, null],

tests/lib/Integration/Fields/ArrayListTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testSortable(): void
7878
/**
7979
* @return array
8080
*/
81-
public function validProvider(): array
81+
public static function validProvider(): array
8282
{
8383
return [
8484
[[]],
@@ -105,7 +105,7 @@ public function testFill($value): void
105105
/**
106106
* @return array
107107
*/
108-
public function invalidProvider(): array
108+
public static function invalidProvider(): array
109109
{
110110
return [
111111
[true],
@@ -254,7 +254,7 @@ public function testReadOnlyOnUpdate(): void
254254
/**
255255
* @return array
256256
*/
257-
public function serializeProvider(): array
257+
public static function serializeProvider(): array
258258
{
259259
return [
260260
[null, null],

tests/lib/Integration/Fields/BooleanTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function testSortable(): void
7979
/**
8080
* @return array
8181
*/
82-
public function validProvider(): array
82+
public static function validProvider(): array
8383
{
8484
return [
8585
[true],
@@ -106,7 +106,7 @@ public function testFill($value): void
106106
/**
107107
* @return array
108108
*/
109-
public function invalidProvider(): array
109+
public static function invalidProvider(): array
110110
{
111111
return [
112112
['foo'],
@@ -243,7 +243,7 @@ public function testReadOnlyOnUpdate(): void
243243
/**
244244
* @return array
245245
*/
246-
public function serializeProvider(): array
246+
public static function serializeProvider(): array
247247
{
248248
return [
249249
'null' => [null],

tests/lib/Integration/Fields/DateTimeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public function testRetainTimezone(): void
154154
/**
155155
* @return array
156156
*/
157-
public function invalidProvider(): array
157+
public static function invalidProvider(): array
158158
{
159159
return [
160160
[true],

0 commit comments

Comments
 (0)