Skip to content

Commit c78dc44

Browse files
committed
tests: Drop support for PHPUnit 7 and support PHPUnit 10
1 parent 4e72553 commit c78dc44

11 files changed

+20
-20
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"symfony/console": "~3.4|~4.3|^5|^6"
4444
},
4545
"require-dev": {
46-
"phpunit/phpunit": "^7 || ^8 || ^9",
46+
"phpunit/phpunit": "^8 || ^9 || ^10",
4747
"phpstan/phpstan": "^1.4.6",
4848
"wdes/coding-standard": "^3.2"
4949
},

tests/ErrorFormatter/CheckstyleErrorFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class CheckstyleErrorFormatterTest extends ErrorFormatterTestCase
4040
/**
4141
* @return iterable<array>
4242
*/
43-
public function dataFormatterOutputProvider(): iterable
43+
public static function dataFormatterOutputProvider(): iterable
4444
{
4545
yield [
4646
'No errors',

tests/ErrorFormatter/GithubErrorFormatterTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ class GithubErrorFormatterTest extends ErrorFormatterTestCase
4040
/**
4141
* @return iterable<array>
4242
*/
43-
public function dataFormatterOutputProvider(): iterable
43+
public static function dataFormatterOutputProvider(): iterable
4444
{
45-
$dashLine = $this->getTableDecoration();
45+
$dashLine = self::getTableDecoration();
4646

4747
yield [
4848
'No errors',
@@ -64,7 +64,7 @@ public function dataFormatterOutputProvider(): iterable
6464
Line folder with unicode 😃/file name with "spaces" and unicode 😃.php
6565
' . $dashLine . '
6666
4 Foo
67-
' . $dashLine . $this->getEndTable() . '
67+
' . $dashLine . self::getEndTable() . '
6868
6969
[ERROR] Found 1 error
7070
@@ -82,7 +82,7 @@ public function dataFormatterOutputProvider(): iterable
8282
-- ---------------------
8383
first generic error
8484
-- ---------------------
85-
' . $this->getEndTable() . '
85+
' . self::getEndTable() . '
8686
[ERROR] Found 1 error
8787
8888
::error ::first generic error
@@ -130,7 +130,7 @@ public function dataFormatterOutputProvider(): iterable
130130
first generic error
131131
second generic error
132132
-- ----------------------
133-
' . $this->getEndTable() . '
133+
' . self::getEndTable() . '
134134
[ERROR] Found 2 errors
135135
136136
::error ::first generic error

tests/ErrorFormatter/GitlabFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class GitlabFormatterTest extends ErrorFormatterTestCase
3838
/**
3939
* @return iterable<array>
4040
*/
41-
public function dataFormatterOutputProvider(): iterable
41+
public static function dataFormatterOutputProvider(): iterable
4242
{
4343
yield [
4444
'No errors',

tests/ErrorFormatter/JsonErrorFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class JsonErrorFormatterTest extends ErrorFormatterTestCase
3737
/**
3838
* @return iterable<array>
3939
*/
40-
public function dataFormatterOutputProvider(): iterable
40+
public static function dataFormatterOutputProvider(): iterable
4141
{
4242
yield [
4343
'No errors',

tests/ErrorFormatter/JunitErrorFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function setUp(): void
5050
/**
5151
* @return \Generator<array<int, string|int>>
5252
*/
53-
public function dataFormatterOutputProvider(): Generator
53+
public static function dataFormatterOutputProvider(): Generator
5454
{
5555
yield 'No errors' => [
5656
0,

tests/ErrorFormatter/RawErrorFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class RawErrorFormatterTest extends ErrorFormatterTestCase
3737
/**
3838
* @return iterable<array>
3939
*/
40-
public function dataFormatterOutputProvider(): iterable
40+
public static function dataFormatterOutputProvider(): iterable
4141
{
4242
yield [
4343
'No errors',

tests/ErrorFormatter/TableErrorFormatterTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ class TableErrorFormatterTest extends ErrorFormatterTestCase
3939
/**
4040
* @return iterable<array>
4141
*/
42-
public function dataFormatterOutputProvider(): iterable
42+
public static function dataFormatterOutputProvider(): iterable
4343
{
44-
$dashLine = $this->getTableDecoration();
44+
$dashLine = self::getTableDecoration();
4545

4646
yield [
4747
'No errors',
@@ -63,7 +63,7 @@ public function dataFormatterOutputProvider(): iterable
6363
Line folder with unicode 😃/file name with "spaces" and unicode 😃.php
6464
' . $dashLine . '
6565
4 Foo
66-
' . $dashLine . $this->getEndTable() . '
66+
' . $dashLine . self::getEndTable() . '
6767
6868
[ERROR] Found 1 error
6969
@@ -80,7 +80,7 @@ public function dataFormatterOutputProvider(): iterable
8080
-- ---------------------
8181
first generic error
8282
-- ---------------------
83-
' . $this->getEndTable() . '
83+
' . self::getEndTable() . '
8484
[ERROR] Found 1 error
8585
8686
',
@@ -123,7 +123,7 @@ public function dataFormatterOutputProvider(): iterable
123123
first generic error
124124
second generic error
125125
-- ----------------------
126-
' . $this->getEndTable() . '
126+
' . self::getEndTable() . '
127127
[ERROR] Found 2 errors
128128
129129
',

tests/ErrorFormatter/TeamcityErrorFormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class TeamcityErrorFormatterTest extends ErrorFormatterTestCase
3939
/**
4040
* @return iterable<array>
4141
*/
42-
public function dataFormatterOutputProvider(): iterable
42+
public static function dataFormatterOutputProvider(): iterable
4343
{
4444
yield [
4545
'No errors',

tests/ErrorFormatterTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ abstract class ErrorFormatterTestCase extends \CodeLts\CliTools\Tests\AbstractTe
4949
/** @var Output|null */
5050
private $output = null;
5151

52-
protected function getEndTable(): string
52+
protected static function getEndTable(): string
5353
{
5454
if (PHP_MAJOR_VERSION === 7 && PHP_MINOR_VERSION === 1) {
5555
return '';
@@ -58,7 +58,7 @@ protected function getEndTable(): string
5858
return "\n";
5959
}
6060

61-
protected function getTableDecoration(): string
61+
protected static function getTableDecoration(): string
6262
{
6363
if (PHP_MAJOR_VERSION === 7 && PHP_MINOR_VERSION === 1) {
6464
return '------ -----------------------------------------------------------------';

0 commit comments

Comments
 (0)