Skip to content

Commit 7f028e8

Browse files
committed
fixup! [phpunit 12] Add /ExpressionCreateMockToCreateStubRector
1 parent dddef18 commit 7f028e8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace Rector\PHPUnit\Tests\PHPUnit120\Rector\ClassMethod\ExpressionCreateMockToCreateStubRector\Fixture;
4+
5+
use PHPUnit\Framework\TestCase;
6+
use Rector\PHPUnit\Tests\PHPUnit120\Rector\ClassMethod\ExpressionCreateMockToCreateStubRector\Source\ClassWithDependency;
7+
8+
final class SkipPropertyForExternalScope extends TestCase
9+
{
10+
private \PHPUnit\Framework\MockObject\MockObject $mock;
11+
12+
public function test()
13+
{
14+
$this->mock = $this->createMock(\stdClass::class);
15+
16+
$someObject = new ClassWithDependency($this->mock);
17+
$this->assertSame($this->mock, $someObject->getDependency());
18+
}
19+
}

0 commit comments

Comments
 (0)