Skip to content

Commit da773e5

Browse files
committed
XTestCaseTest: update for PHPUnit 12.2.0
> A warning is now emitted when a data provider provides data sets that have more values than the test method consumes using arguments While not problematic for PHPUnit Polyfills 1.x - 3.x, this will fail tests for 4.x (without this change). Ref: https://github.com/sebastianbergmann/phpunit/blob/12.2/ChangeLog-12.2.md#changed-1
1 parent d77542d commit da773e5

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

tests/TestCases/XTestCaseTest.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,21 @@ public static function tearDownFixturesAfterClass() {
9999
*
100100
* @dataProvider dataHaveFixtureMethodsBeenTriggered
101101
*
102-
* @param int $expectedBeforeClass Value expected for the $beforeClass property.
103-
* @param int $expectedBefore Value expected for the $before property.
104-
* @param int $expectedAfter Value expected for the $after property.
102+
* @param int $expectedBeforeClass Value expected for the $beforeClass property.
103+
* @param int $expectedBefore Value expected for the $before property.
104+
* @param int $expectedAfter Value expected for the $after property.
105+
* @param int $expectedPreConditions Unused. "assertPreConditions" can not be triggered via annotations.
106+
* @param int $expectedPostConditions Unused. "assertPostConditions" can not be triggered via annotations.
105107
*
106108
* @return void
107109
*/
108-
public function testHaveFixtureMethodsBeenTriggered( $expectedBeforeClass, $expectedBefore, $expectedAfter ) {
110+
public function testHaveFixtureMethodsBeenTriggered(
111+
$expectedBeforeClass,
112+
$expectedBefore,
113+
$expectedAfter,
114+
$expectedPreConditions, // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
115+
$expectedPostConditions // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
116+
) {
109117
$this->assertSame(
110118
$expectedBeforeClass,
111119
self::$beforeClass,

0 commit comments

Comments
 (0)