-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathsome_test.php.inc
More file actions
63 lines (48 loc) · 1.51 KB
/
some_test.php.inc
File metadata and controls
63 lines (48 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
namespace Rector\PHPUnit\Tests\Issues\MockToStubSetupCombined\Fixture;
use PHPUnit\Framework\TestCase;
use Rector\PHPUnit\Tests\CodeQuality\Rector\MethodCall\UseSpecificWillMethodRector\Fixture\SomeClass;
use Rector\PHPUnit\Tests\Issues\MockToStubSetupCombined\Source\MockedClass;
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
final class SomeTest extends TestCase
{
private \PHPUnit\Framework\MockObject\MockObject $someMock;
protected function setUp(): void
{
$this->someMock = $this->createMock(MockedClass::class);
$generator = new RewindableGenerator(fn () => yield from [
$this->someMock,
], 2);
}
public function testSomething(): void
{
}
public function testAnother(): void
{
}
}
?>
-----
<?php
namespace Rector\PHPUnit\Tests\Issues\MockToStubSetupCombined\Fixture;
use PHPUnit\Framework\TestCase;
use Rector\PHPUnit\Tests\CodeQuality\Rector\MethodCall\UseSpecificWillMethodRector\Fixture\SomeClass;
use Rector\PHPUnit\Tests\Issues\MockToStubSetupCombined\Source\MockedClass;
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
final class SomeTest extends TestCase
{
protected function setUp(): void
{
$someMock = $this->createMock(MockedClass::class);
$generator = new RewindableGenerator(fn () => yield from [
$someMock,
], 2);
}
public function testSomething(): void
{
}
public function testAnother(): void
{
}
}
?>