8000 [8.x] Ignore skipped tests (#42585) · laravel/framework@51efb37 · GitHub
[go: up one dir, main page]

Skip to content

Commit 51efb37

Browse files
committed
[8.x] Ignore skipped tests (#42585)
* Ignore skipped tests * wip
1 parent 45f4676 commit 51efb37

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

phpunit.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
convertErrorsToExceptions="true"
88
convertNoticesToExceptions="true"
99
convertWarningsToExceptions="true"
10+
printerClass="Illuminate\Tests\IgnoreSkippedPrinter"
1011
processIsolation="false"
1112
stopOnError="false"
1213
stopOnFailure="false"

tests/IgnoreSkippedPrinter.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
namespace Illuminate\Tests;
4+
5+
use PHPUnit\Framework\TestResult;
6+
use PHPUnit\Runner\Version;
7+
use PHPUnit\TextUI\DefaultResultPrinter as PHPUnit9ResultPrinter;
8+
use PHPUnit\TextUI\ResultPrinter as PHPUnit8ResultPrinter;
9+
10+
if (class_exists(Version::class) && (int) Version::series()[0] >= 9) {
11+
class IgnoreSkippedPrinter extends PHPUnit9ResultPrinter
12+
{
13+
protected function printSkipped(TestResult $result): void
14+
{
15+
//
16+
}
17+
}
18+
} else {
19+
class IgnoreSkippedPrinter extends PHPUnit8ResultPrinter
20+
{
21+
protected function printSkipped(TestResult $result): void
22+
{
23+
//
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)
0