Skip to content
This repository was archived by the owner on May 26, 2021. It is now read-only.

Commit d9d919d

Browse files
authored
Merge pull request #3 from asheliahut/feature/php9-support
add in php 9 support
2 parents 7e457c3 + d48801d commit d9d919d

File tree

2 files changed

+32
-7
lines changed

2 files changed

+32
-7
lines changed

ResultPrinter.php

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
<?php
22
/**
3-
* Copyright (c) 2014-2018 Ryan Parman <http://ryanparman.com>
3+
* Copyright (c) 2014-2020 Ryan Parman <http://ryanparman.com>
44
*/
55
namespace Skyzyx\ResultPrinter;
66

7-
use PHPUnit\Extensions\PhptTestCase;
87
use PHPUnit\Framework\Test;
98
use PHPUnit\Framework\TestCase;
109
use PHPUnit\Framework\TestSuite;
11-
use PHPUnit\TextUI\ResultPrinter as PPrinter;
10+
use PHPUnit\Runner\PhptTestCase;
11+
use PHPUnit\TextUI\DefaultResultPrinter as PPrinter;
1212
use PHPUnit\Util\Test as TestUtil;
1313

14+
/**
15+
* Class ResultPrinter
16+
* @package Skyzyx\ResultPrinter
17+
*/
1418
class ResultPrinter extends PPrinter
1519
{
1620
/** @var string */
@@ -34,10 +38,31 @@ class ResultPrinter extends PPrinter
3438
/** @var string */
3539
protected $passEmoji = "\xE2\x9c\x93"; // Checkmark
3640

41+
/** @var int */
42+
protected $numTestsRun;
43+
44+
/** @var int */
45+
protected $numTests;
46+
47+
/** @var int */
48+
protected $column;
49+
50+
/** @var int */
51+
protected $numTestsWidth;
52+
53+
/** @var int */
54+
protected $maxColumn;
55+
56+
/** @var bool */
57+
protected $lastTestFailed;
58+
59+
/** @var int */
60+
protected $numAssertions;
61+
3762
/**
38-
* {@inheritdoc}
63+
* @param string $progress
3964
*/
40-
protected function writeProgress($progress): void
65+
protected function writeProgress(string $progress): void
4166
{
4267
switch ($progress) {
4368
case 'E':

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"description": "A custom printer for PHPUnit.",
44
"type": "library",
55
"require": {
6-
"php": ">=7.1",
7-
"phpunit/phpunit": "^7.0"
6+
"php": ">=7.2",
7+
"phpunit/phpunit": "^9.0"
88
},
99
"license": "MIT",
1010
"authors": [

0 commit comments

Comments
 (0)