Skip to content

Commit 0d83b2f

Browse files
Fix tests on PHPUnit 9
1 parent ecddd6d commit 0d83b2f

File tree

3 files changed

+16
-32
lines changed

3 files changed

+16
-32
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
/src/data/third-party/
66
composer.phar
77
composer.lock
8+
.phpunit.result.cache

phpunit.xml

+14-29
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="tests/bootstrap.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnError="false"
11-
stopOnFailure="false"
12-
syntaxCheck="true"
13-
verbose="true"
14-
>
15-
<testsuites>
16-
<testsuite name="Laravel Test Suite">
17-
<directory suffix="Test.php">./tests</directory>
18-
</testsuite>
19-
</testsuites>
20-
<filter>
21-
<whitelist processUncoveredFilesFromWhitelist="true">
22-
<directory suffix=".php">./src</directory>
23-
<exclude>./src/package/Update</exclude>
24-
</whitelist>
25-
</filter>
26-
<logging>
27-
<log type="coverage-html" target="coverage/" lowUpperBound="35" highLowerBound="70"/>
28-
<log type="coverage-clover" target="coverage/coverage-clover.xml" lowUpperBound="35" highLowerBound="70"/>
29-
<log type="coverage-text" target="php://stdout" showUncoveredFiles="true"/>
30-
</logging>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" bootstrap="tests/bootstrap.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnError="false" stopOnFailure="false" verbose="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage>
4+
<report>
5+
<clover outputFile="coverage/coverage-clover.xml"/>
6+
<html outputDirectory="coverage/" lowUpperBound="35" highLowerBound="70"/>
7+
<text outputFile="php://stdout" showUncoveredFiles="true"/>
8+
</report>
9+
</coverage>
10+
<testsuites>
11+
<testsuite name="Laravel Test Suite">
12+
<directory suffix="Test.php">./tests</directory>
13+
</testsuite>
14+
</testsuites>
15+
<logging/>
3116
</phpunit>

tests/CountriesTest.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ public function testCountEverything()
8888
}, 0);
8989
});
9090

91-
$results = coollect($results)->sortBy(function ($country) {
92-
return $country[1];
93-
});
91+
$results = coollect($results)->sort();
9492

9593
$this->assertEquals($results->toArray(), [
9694
'taxes' => 33,

0 commit comments

Comments
 (0)