This repository was archived by the owner on Feb 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrinter.php
More file actions
56 lines (48 loc) · 1.4 KB
/
Printer.php
File metadata and controls
56 lines (48 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
declare(strict_types=1);
/**
* Copyright (c) 2020 Daniel Bannert
*
* For the full copyright and license information, please view
* the LICENSE.md file that was distributed with this source code.
*
* @see https://github.com/testomat/phpunit
*/
namespace Testomat\PHPUnit\Printer;
use Testomat\PHPUnit\Printer\Traits\PrinterContentsTrait;
/**
* This `if` condition exists because phpunit v8 or v9
* is not a direct dependency.
*
* This code bellow it's for phpunit@8
*/
if (class_exists(\PHPUnit\Runner\Version::class) && (int) (substr(\PHPUnit\Runner\Version::id(), 0, 1)) === 8) {
final class Printer extends \PHPUnit\TextUI\ResultPrinter
{
use PrinterContentsTrait;
/**
* Intentionally left blank as we output things on events of the listener.
*/
public function write(string $buffer): void
{
}
}
}
/**
* This `if` condition exists because phpunit v8 or v9
* is not a direct dependency.
*
* This code bellow it's for phpunit@9
*/
if (class_exists(\PHPUnit\Runner\Version::class) && (int) (substr(\PHPUnit\Runner\Version::id(), 0, 1)) === 9) {
final class Printer implements \PHPUnit\TextUI\ResultPrinter
{
use PrinterContentsTrait;
/**
* Intentionally left blank as we output things on events of the listener.
*/
public function write(string $buffer): void
{
}
}
}