Skip to content

Commit f3fb80a

Browse files
committed
put test out of global namspace
1 parent c958367 commit f3fb80a

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

Diff for: tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3421,8 +3421,8 @@ public function testBug11559c(): void
34213421

34223422
$this->analyse([__DIR__ . '/data/bug-11559c.php'], [
34233423
[
3424-
'Method class@anonymous/tests/PHPStan/Rules/Methods/data/bug-11559c.php:5:1::regular_fn() invoked with 3 parameters, 1 required.',
3425-
14,
3424+
'Method class@anonymous/tests/PHPStan/Rules/Methods/data/bug-11559c.php:6:1::regular_fn() invoked with 3 parameters, 1 required.',
3425+
15,
34263426
],
34273427
]);
34283428
}

Diff for: tests/PHPStan/Rules/Methods/data/bug-11559c.php

+11-9
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
namespace Bug11559c;
44

5-
$c = new class (new class {}) {
6-
function implicit_variadic_fn() {
7-
$args = func_get_args();
8-
}
9-
function regular_fn(int $i) {
10-
}
11-
};
5+
function doFoo() {
6+
$c = new class (new class {}) {
7+
function implicit_variadic_fn() {
8+
$args = func_get_args();
9+
}
10+
function regular_fn(int $i) {
11+
}
12+
};
1213

13-
$c->implicit_variadic_fn(1, 2, 3);
14-
$c->regular_fn(1, 2, 3);
14+
$c->implicit_variadic_fn(1, 2, 3);
15+
$c->regular_fn(1, 2, 3);
16+
}

0 commit comments

Comments
 (0)