Skip to content

Commit

Permalink
chore: release 0.27 -- phpunit 9 support
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeerickson committed Feb 29, 2020
1 parent 953a82f commit b132164
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codedungeon/phpunit-result-printer",
"version": "0.26.2",
"version": "0.27.0",
"description": "PHPUnit Pretty Result Printer",
"keywords": [
"phpunit",
Expand All @@ -25,7 +25,7 @@
"symfony/yaml": "^2.7|^3.0|^4.0",
"codedungeon/php-cli-colors": "^1.10.2",
"2bj/phanybar": "^1.0",
"phpunit/phpunit": "^8.0"
"phpunit/phpunit": "^8.0|^9.0"
},
"require-dev": {
"spatie/phpunit-watcher": "^1.6"
Expand Down
2 changes: 1 addition & 1 deletion phpunit-printer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ markers:
cd-pass: ""
cd-fail: ""
cd-error: ""
cd-skipped: "=> "
cd-skipped: " "
cd-incomplete: ""
cd-risky: ""
10 changes: 3 additions & 7 deletions src/ResultPrinter80.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
use PHPUnit\Framework\TestFailure;

$low = version_compare(Version::series(), '8.0', '>=');
<<<<<<< HEAD
$high = true; // version_compare(Version::series(),'7.1.99','<=');
=======
$high = version_compare(Version::series(),'8.99.99','<=');
>>>>>>> php74-phpunit9

if ($low && $high) {
class ResultPrinter80 extends ResultPrinter
Expand Down Expand Up @@ -87,7 +83,7 @@ protected function formatExceptionMsg($exceptionMessage): string
return "$exceptionMessage";
}

protected function printDefectTrace(TestFailure $defect): void
protected function printDefectTrace(TestFailure $defect):void
{
$this->write($this->formatExceptionMsg($defect->getExceptionAsString()));
$trace = Filter::getFilteredStacktrace(
Expand All @@ -100,8 +96,8 @@ protected function printDefectTrace(TestFailure $defect): void
while ($exception) {
$this->write(
"\nCaused by\n" .
TestFailure::exceptionToString($exception) . "\n" .
Filter::getFilteredStacktrace($exception)
TestFailure::exceptionToString($exception) . "\n" .
Filter::getFilteredStacktrace($exception)
);
$exception = $exception->getPrevious();
}
Expand Down
4 changes: 2 additions & 2 deletions src/phpunit-printer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ markers:
cd-pass: ""
cd-fail: ""
cd-error: ""
cd-skipped: "=> "
cd-skipped: " "
cd-incomplete: ""
cd-risky: ""
cd-risky: ""

0 comments on commit b132164

Please sign in to comment.