|
5 | 5 | */
|
6 | 6 | namespace Magento\Framework\TestFramework\Unit\Listener;
|
7 | 7 |
|
8 |
| -use PHPUnit\Framework\Test; |
9 |
| -use PHPUnit\Framework\Warning; |
| 8 | +use PHPUnit\Framework\TestListener; |
| 9 | +use PHPUnit\Framework\TestSuite; |
10 | 10 |
|
11 | 11 | /**
|
12 | 12 | * Listener of PHPUnit built-in events that enforces cleanup of cyclic object references
|
13 | 13 | *
|
14 | 14 | */
|
15 |
| -class GarbageCleanup implements \PHPUnit\Framework\TestListener |
| 15 | +class GarbageCleanup implements TestListener |
16 | 16 | {
|
17 |
| - /** |
18 |
| - * {@inheritdoc} |
19 |
| - * @SuppressWarnings(PHPMD.ShortVariable) |
20 |
| - * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
21 |
| - */ |
22 |
| - public function addError(\PHPUnit\Framework\Test $test, \Exception $e, $time) |
23 |
| - { |
24 |
| - } |
25 |
| - |
26 |
| - /** |
27 |
| - * {@inheritdoc} |
28 |
| - * @SuppressWarnings(PHPMD.ShortVariable) |
29 |
| - * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
30 |
| - */ |
31 |
| - public function addFailure(\PHPUnit\Framework\Test $test, \PHPUnit\Framework\AssertionFailedError $e, $time) |
32 |
| - { |
33 |
| - } |
34 |
| - |
35 |
| - /** |
36 |
| - * {@inheritdoc} |
37 |
| - * @SuppressWarnings(PHPMD.ShortVariable) |
38 |
| - * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
39 |
| - */ |
40 |
| - public function addIncompleteTest(\PHPUnit\Framework\Test $test, \Exception $e, $time) |
41 |
| - { |
42 |
| - } |
43 |
| - |
44 |
| - /** |
45 |
| - * {@inheritdoc} |
46 |
| - * @SuppressWarnings(PHPMD.ShortVariable) |
47 |
| - * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
48 |
| - */ |
49 |
| - public function addRiskyTest(\PHPUnit\Framework\Test $test, \Exception $e, $time) |
50 |
| - { |
51 |
| - } |
52 |
| - |
53 |
| - /** |
54 |
| - * {@inheritdoc} |
55 |
| - * @SuppressWarnings(PHPMD.ShortVariable) |
56 |
| - * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
57 |
| - */ |
58 |
| - public function addSkippedTest(\PHPUnit\Framework\Test $test, \Exception $e, $time) |
59 |
| - { |
60 |
| - } |
61 |
| - |
62 |
| - /** |
63 |
| - * {@inheritdoc} |
64 |
| - * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
65 |
| - */ |
66 |
| - public function startTestSuite(\PHPUnit\Framework\TestSuite $suite) |
67 |
| - { |
68 |
| - } |
| 17 | + use \PHPUnit\Framework\TestListenerDefaultImplementation; |
69 | 18 |
|
70 | 19 | /**
|
71 | 20 | * {@inheritdoc}
|
72 | 21 | * @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
73 | 22 | */
|
74 |
| - public function endTestSuite(\PHPUnit\Framework\TestSuite $suite) |
| 23 | + public function endTestSuite(TestSuite $suite): void |
75 | 24 | {
|
76 | 25 | gc_collect_cycles();
|
77 | 26 | }
|
78 |
| - |
79 |
| - /** |
80 |
| - * {@inheritdoc} |
81 |
| - * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
82 |
| - */ |
83 |
| - public function startTest(\PHPUnit\Framework\Test $test) |
84 |
| - { |
85 |
| - } |
86 |
| - |
87 |
| - /** |
88 |
| - * {@inheritdoc} |
89 |
| - * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
90 |
| - */ |
91 |
| - public function endTest(\PHPUnit\Framework\Test $test, $time) |
92 |
| - { |
93 |
| - } |
94 |
| - |
95 |
| - /** |
96 |
| - * {@inheritdoc} |
97 |
| - * @SuppressWarnings(PHPMD.UnusedFormalParameter) |
98 |
| - */ |
99 |
| - public function addWarning(Test $test, Warning $e, $time) |
100 |
| - { |
101 |
| - } |
102 | 27 | }
|
0 commit comments