Skip to content

Commit c21c37d

Browse files
committed
Test - does PHPUnit hardcoded MockObject hack works with used class name?
1 parent e7138ad commit c21c37d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Diff for: tests/PHPStan/Analyser/NodeScopeResolverTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,10 @@ public function dataProperties(): array
13461346
'PHPUnit\Framework\MockObject\MockObject&PropertiesNamespace\Foo',
13471347
'$this->yetAnotherPhpunitProperty',
13481348
],
1349+
[
1350+
'PHPUnit\Framework\MockObject\MockObject&PropertiesNamespace\Foo',
1351+
'$this->yetYetAnotherPhpunitProperty',
1352+
],
13491353
];
13501354
}
13511355

Diff for: tests/PHPStan/Analyser/data/properties.php

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use SomeNamespace\Amet as Dolor;
66
use SomeGroupNamespace\{One, Two as Too, Three};
7+
use PHPUnit\Framework\MockObject\MockObject;
78

89
abstract class Foo extends Bar
910
{
@@ -136,6 +137,11 @@ abstract class Foo extends Bar
136137
*/
137138
private $yetAnotherPhpunitProperty;
138139

140+
/**
141+
* @var Foo|MockObject
142+
*/
143+
private $yetYetAnotherPhpunitProperty;
144+
139145
public function doFoo()
140146
{
141147
die;

0 commit comments

Comments
 (0)