Skip to content

Commit b105bce

Browse files
committed
Refactor test setup with latest PHPUnit version
1 parent 40f7f4a commit b105bce

File tree

3 files changed

+15
-31
lines changed

3 files changed

+15
-31
lines changed

Tests/bootstrap.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
getenv('IMAGEMAGICK_PATH') ?: null, // Fall back again to PATH
3434
];
3535
foreach ($possibleDirectories as $path) {
36-
if (!$path) {
37-
// Could happen if "getenv()" returns false or empty string.
38-
continue;
39-
}
4036
echo 'Check "'.$path.'" binary'."\n";
4137
try {
4238
$path = Command::findMagickBinaryPath($path);

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"minimum-stability": "stable",
2424
"autoload": {
2525
"psr-4": {
26-
"Orbitale\\Component\\ImageMagick\\": "src/"
26+
"Orbitale\\Component\\ImageMagick\\": "src/",
27+
"Orbitale\\Component\\ImageMagick\\Tests\\": "Tests/"
2728
}
2829
}
2930
}

phpunit.xml.dist

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,21 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html -->
32
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/7.5/phpunit.xsd"
5-
colors="true"
6-
stopOnFailure="false"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
4+
cacheResultFile="build/cache-results"
5+
executionOrder="depends,defects"
76
bootstrap="Tests/bootstrap.php"
8-
>
7+
verbose="true"
8+
>
9+
910
<testsuites>
10-
<testsuite name="OrbitaleImageMagickPHP test suite">
11-
<directory>Tests</directory>
11+
<testsuite name="default">
12+
<directory>Tests/</directory>
1213
</testsuite>
1314
</testsuites>
1415

15-
<!--
16-
<logging>
17-
<log type="coverage-html" target="./build/report/" />
18-
</logging>
19-
-->
20-
21-
<filter>
22-
<whitelist processUncoveredFilesFromWhitelist="true">
23-
<file>Command.php</file>
24-
<file>CommandOptions.php</file>
25-
<file>CommandResponse.php</file>
26-
<directory suffix=".php">./ReferenceClasses</directory>
27-
<exclude>
28-
<directory>./build</directory>
29-
<directory>./vendor</directory>
30-
<directory>./Tests</directory>
31-
</exclude>
32-
</whitelist>
33-
</filter>
16+
<coverage cacheDirectory="build/cache-coverage" processUncoveredFiles="true">
17+
<include>
18+
<directory suffix=".php">./src/</directory>
19+
</include>
20+
</coverage>
3421
</phpunit>

0 commit comments

Comments
 (0)