Skip to content

Commit 20bcee8

Browse files
committed
Upgrade phpunit to version ^10.5
1 parent 7709d94 commit 20bcee8

File tree

4 files changed

+52
-49
lines changed

4 files changed

+52
-49
lines changed

.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
@@ -47,7 +47,7 @@
4747
"jetbrains/phpstorm-attributes": "^1.0",
4848
"phpmd/phpmd": "^2.13",
4949
"phpstan/phpstan": "^1.5",
50-
"phpunit/phpunit": "^9.5"
50+
"phpunit/phpunit": "^10.5"
5151
},
5252
"minimum-stability": "dev",
5353
"prefer-stable": true,

phpunit.xml.dist

Lines changed: 10 additions & 8 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"
5-
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>
3+
bootstrap="vendor/autoload.php" colors="true" stopOnError="false" stopOnFailure="false"
4+
stopOnIncomplete="false" stopOnSkipped="false"
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"/>
@@ -21,4 +18,9 @@
2118
<php>
2219
<env name="XDEBUG_MODE" value="coverage"/>
2320
</php>
21+
<source>
22+
<include>
23+
<directory suffix=".php">src</directory>
24+
</include>
25+
</source>
2426
</phpunit>

tests/PagerTest.php

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -294,24 +294,6 @@ public function testJsonSerializable() : void
294294
);
295295
}
296296

297-
/**
298-
* @return array<array<string>>
299-
*/
300-
public function viewsProvider() : array
301-
{
302-
return [
303-
['pagination'],
304-
['bootstrap'],
305-
['bulma'],
306-
['foundation'],
307-
['materialize'],
308-
['primer'],
309-
['semantic-ui'],
310-
['tailwind'],
311-
['w3'],
312-
];
313-
}
314-
315297
/**
316298
* @dataProvider viewsProvider
317299
*
@@ -327,17 +309,6 @@ public function testPaginationViews(string $view) : void
327309
self::assertStringContainsString('Last', $contents);
328310
}
329311

330-
/**
331-
* @return array<array<string>>
332-
*/
333-
public function previousDisabledProvider() : array
334-
{
335-
return [
336-
['primer', 'aria-disabled="true"'],
337-
['primer-short', 'aria-disabled="true"'],
338-
];
339-
}
340-
341312
/**
342313
* @dataProvider previousDisabledProvider
343314
*
@@ -353,17 +324,6 @@ public function testPreviousIsDisabled(string $view, string $needle) : void
353324
self::assertStringContainsString($needle, $contents);
354325
}
355326

356-
/**
357-
* @return array<array<string>>
358-
*/
359-
public function nextDisabledProvider() : array
360-
{
361-
return [
362-
['primer', 'aria-disabled="true"'],
363-
['primer-short', 'aria-disabled="true"'],
364-
];
365-
}
366-
367327
/**
368328
* @dataProvider nextDisabledProvider
369329
*
@@ -410,4 +370,44 @@ public function testSanitize() : void
410370
self::assertSame(\PHP_INT_MAX, Pager::sanitize(\PHP_INT_MAX . '123'));
411371
self::assertSame(\PHP_INT_MAX - 1, Pager::sanitize(\PHP_INT_MAX - 1));
412372
}
373+
374+
/**
375+
* @return array<array<string>>
376+
*/
377+
public static function viewsProvider() : array
378+
{
379+
return [
380+
['pagination'],
381+
['bootstrap'],
382+
['bulma'],
383+
['foundation'],
384+
['materialize'],
385+
['primer'],
386+
['semantic-ui'],
387+
['tailwind'],
388+
['w3'],
389+
];
390+
}
391+
392+
/**
393+
* @return array<array<string>>
394+
*/
395+
public static function previousDisabledProvider() : array
396+
{
397+
return [
398+
['primer', 'aria-disabled="true"'],
399+
['primer-short', 'aria-disabled="true"'],
400+
];
401+
}
402+
403+
/**
404+
* @return array<array<string>>
405+
*/
406+
public static function nextDisabledProvider() : array
407+
{
408+
return [
409+
['primer', 'aria-disabled="true"'],
410+
['primer-short', 'aria-disabled="true"'],
411+
];
412+
}
413413
}

0 commit comments

Comments
 (0)