Skip to content

Commit 5aaf992

Browse files
committed
Upgrade to phpunit 10
1 parent 4337056 commit 5aaf992

File tree

4 files changed

+15
-21
lines changed

4 files changed

+15
-21
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
run: composer install --no-progress --prefer-dist --optimize-autoloader
3434

3535
- name: Test with phpunit
36-
run: vendor/bin/phpunit --coverage-text
36+
run: vendor/bin/phpunit

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"require-dev": {
2222
"friendsofphp/php-cs-fixer": "3.*",
23-
"phpunit/phpunit": "^9.0",
23+
"phpunit/phpunit": "^10.0",
2424
"squizlabs/php_codesniffer": "3.*",
2525
"phpstan/phpstan": "*"
2626
},

phpunit.xml.dist

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
3-
<phpunit bootstrap="./tests/bootstrap.php" colors="true">
4-
<testsuites>
5-
<testsuite name="GeoIP2 Test Suite">
6-
<directory suffix="Test.php">./tests/GeoIp2/Test/</directory>
7-
</testsuite>
8-
</testsuites>
9-
10-
<filter>
11-
<whitelist>
12-
<directory suffix=".php">./src/GeoIp2/</directory>
13-
</whitelist>
14-
</filter>
15-
16-
<logging>
17-
<log type="coverage-clover" target="build/logs/clover.xml"/>
18-
</logging>
19-
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./tests/bootstrap.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd" cacheDirectory=".phpunit.cache">
3+
<testsuites>
4+
<testsuite name="GeoIP2 Test Suite">
5+
<directory suffix="Test.php">./tests/GeoIp2/Test/</directory>
6+
</testsuite>
7+
</testsuites>
8+
<logging/>
9+
<source>
10+
<include>
11+
<directory suffix=".php">./src/GeoIp2/</directory>
12+
</include>
13+
</source>
2014
</phpunit>

tests/GeoIp2/Test/Database/ReaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515
class ReaderTest extends TestCase
1616
{
17-
public function databaseTypes(): array
17+
public static function databaseTypes(): array
1818
{
1919
return [['City', 'city'], ['Country', 'country']];
2020
}

0 commit comments

Comments
 (0)