Skip to content

Commit e4b0d98

Browse files
committed
Update phpunit and infection
1 parent f7209c4 commit e4b0d98

5 files changed

Lines changed: 13 additions & 29 deletions

File tree

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"webmozart/assert": "^1.10"
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "~9.0",
22+
"phpunit/phpunit": "^11.0",
2323
"mockery/mockery": "^1.4",
24-
"infection/infection": "^0.25",
24+
"infection/infection": "^0.32.6",
2525
"symplify/easy-coding-standard": "^9.0"
2626
},
2727
"autoload": {

infection.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"@conditional_negotiation": true,
2121
"@equal": true,
2222
"@function_signature": true,
23-
"IdenticalEqual": false,
2423
"@number": true,
2524
"@operator": true,
2625
"@regex": true,

phpunit.xml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3-
<coverage>
4-
<include>
5-
<directory>src/</directory>
6-
</include>
7-
</coverage>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php"
3+
colors="true"
4+
processIsolation="false"
5+
stopOnFailure="false"
6+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
87
<testsuites>
98
<testsuite name="unit">
109
<directory suffix=".php">./tests/Unit</directory>
1110
</testsuite>
1211
</testsuites>
12+
<source>
13+
<include>
14+
<directory>src</directory>
15+
</include>
16+
</source>
1317
</phpunit>

tests/Unit/CrawlerTest.php

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -78,23 +78,4 @@ public function test_classnames_are_returned_as_list(): void
7878

7979
self::assertIsList($crawler->classNames());
8080
}
81-
82-
public static function assertIsList($actual, $message = ''): void
83-
{
84-
if (function_exists("array_is_list")) {
85-
self::assertTrue(array_is_list($actual), $message);
86-
} else {
87-
$isList = true;
88-
$i = 0;
89-
90-
foreach ($actual as $key => $_value) {
91-
if ($key !== $i++) {
92-
$isList = false;
93-
break;
94-
}
95-
}
96-
97-
self::assertTrue($isList, $message);
98-
}
99-
}
10081
}

tests/Unit/ElectricianTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public function test_it_throws_an_exception_on_an_invalid_custom_listen_attribut
279279
new Electrician(crawler: $crawler, listenAttribute: $invalidAttribute);
280280
}
281281

282-
public function invalidAttributeProvider(): Generator
282+
public static function invalidAttributeProvider(): Generator
283283
{
284284
yield 'This is text, what are you doing?' => [
285285
'Hello, World!',

0 commit comments

Comments
 (0)