Skip to content

Commit 1c004af

Browse files
kubawerlossebastianbergmann
authored andcommitted
Renaming
1 parent 18911e5 commit 1c004af

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

tests/end-to-end/regression/5891.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ Runtime: %s
1717

1818
Time: %s, Memory: %s MB
1919

20-
OK (2 tests, 3 assertions)
20+
OK (2 tests, 2 assertions)

tests/end-to-end/regression/5891/Issue5891Test.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ final class Issue5891Test extends TestCase
1515
{
1616
public function testVariadicParam(): void
1717
{
18-
$variadicParam = $this->createMock(VariadicParam::class);
19-
$variadicParam
18+
$mock = $this->createMock(ArgumentList::class);
19+
$mock
2020
->method('foo')
2121
->with($this->callback(static function (...$items): bool
2222
{
@@ -25,31 +25,31 @@ public function testVariadicParam(): void
2525
return true;
2626
}));
2727

28-
$variadicParam->foo(1, 2, 3);
28+
$mock->foo(1, 2, 3);
2929
}
3030

3131
public function testTwoParametersAndVariadicParam(): void
3232
{
33-
$twoParametersAndVariadicParam = $this->createMock(TwoParametersAndVariadicParam::class);
34-
$twoParametersAndVariadicParam
33+
$mock = $this->createMock(TwoParametersAndArgumentList::class);
34+
$mock
3535
->method('foo')
36-
->with($this->callback(static function ($head, ...$tail): bool
36+
->with($this->callback(static function (...$items): bool
3737
{
38-
self::assertSame('1st', $head);
39-
self::assertSame(['2nd', '3rd', '4th'], $tail);
38+
self::assertSame(['1st', '2nd', '3rd', '4th'], $items);
4039

4140
return true;
4241
}));
4342

44-
$twoParametersAndVariadicParam->foo('1st', '2nd', '3rd', '4th');
43+
$mock->foo('1st', '2nd', '3rd', '4th');
4544
}
4645
}
4746

48-
interface VariadicParam
47+
interface ArgumentList
4948
{
5049
public function foo(int ...$items): void;
5150
}
52-
interface TwoParametersAndVariadicParam
51+
52+
interface TwoParametersAndArgumentList
5353
{
5454
public function foo(string $first, string $second, string ...$rest): void;
5555
}

0 commit comments

Comments
 (0)