Skip to content

Commit 7094f7c

Browse files
committed
fix bad merge
1 parent a0da6c4 commit 7094f7c

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3844,6 +3844,19 @@ public function testBug12875(): void
38443844
$this->analyse([__DIR__ . '/data/bug-12875.php'], []);
38453845
}
38463846

3847+
public function testBug14150(): void
3848+
{
3849+
$this->checkThisOnly = false;
3850+
$this->checkNullables = true;
3851+
$this->checkUnionTypes = true;
3852+
$this->analyse([__DIR__ . '/data/bug-14150.php'], [
3853+
[
3854+
'Call to an undefined method Bug14150Method\HelloWorld::y().',
3855+
21,
3856+
],
3857+
]);
3858+
}
3859+
38473860
#[RequiresPhp('>= 8.1')]
38483861
public function testBug13805(): void
38493862
{
@@ -3853,6 +3866,57 @@ public function testBug13805(): void
38533866
$this->analyse([__DIR__ . '/data/bug-13805.php'], []);
38543867
}
38553868

3869+
public function testBug9820(): void
3870+
{
3871+
$this->checkThisOnly = false;
3872+
$this->checkNullables = true;
3873+
$this->checkUnionTypes = true;
3874+
$this->analyse([__DIR__ . '/data/bug-9820.php'], [
3875+
[
3876+
'Method Bug9820\HelloWorld::x() invoked with 1 parameter, 0 required.',
3877+
20,
3878+
],
3879+
[
3880+
'Method Bug9820\HelloWorld::x() invoked with 1 parameter, 0 required.',
3881+
27,
3882+
],
3883+
[
3884+
'Method Bug9820\HelloWorld::x() invoked with 1 parameter, 0 required.',
3885+
33,
3886+
],
3887+
[
3888+
'Method Bug9820\HelloWorld::x() invoked with 1 parameter, 0 required.',
3889+
40,
3890+
],
3891+
]);
3892+
}
3893+
3894+
#[RequiresPhp('>= 8.1')]
3895+
public function testBug6120(): void
3896+
{
3897+
$this->checkThisOnly = false;
3898+
$this->checkNullables = true;
3899+
$this->checkUnionTypes = true;
3900+
$this->analyse([__DIR__ . '/data/bug-6120.php'], []);
3901+
}
3902+
3903+
public function testBug11463(): void
3904+
{
3905+
$this->checkThisOnly = false;
3906+
$this->checkNullables = true;
3907+
$this->checkUnionTypes = true;
3908+
$this->analyse([__DIR__ . '/../PhpDoc/data/bug-11463.php'], [
3909+
[
3910+
"Parameter #1 \$bar of method Bug11463\FooType::foo() expects 'bar', 'bla' given.",
3911+
32,
3912+
],
3913+
[
3914+
"Parameter #1 \$foo of method Bug11463\BarType::bar() expects 'foo', 'bla' given.",
3915+
35,
3916+
],
3917+
]);
3918+
}
3919+
38563920
public function testBug7978(): void
38573921
{
38583922
$this->checkThisOnly = false;

0 commit comments

Comments
 (0)