Skip to content

Commit 8937c0f

Browse files
authored
minimize README code example (#353)
1 parent 6e24e8f commit 8937c0f

File tree

1 file changed

+0
-79
lines changed

1 file changed

+0
-79
lines changed

Diff for: README.md

-79
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@ use PHPUnit\Framework;
4646

4747
final class ExampleTest extends Framework\TestCase
4848
{
49-
private $prophecy;
50-
51-
protected function setUp()
52-
{
53-
$this->prophecy = $this->prophesize(SomeModel::class);
54-
}
55-
5649
public function testSomething(): void
5750
{
5851
$prophecy = $this->prophesize(SomeModel::class);
@@ -61,26 +54,6 @@ final class ExampleTest extends Framework\TestCase
6154

6255
// ...
6356
}
64-
65-
public function testSomethingElse(): void
66-
{
67-
$testDouble = $this->prophecy->reveal();
68-
69-
// ...
70-
}
71-
72-
public function testSomethingDifferent(): void
73-
{
74-
$testDouble = $this->createProphecy()->reveal();
75-
76-
// ...
77-
}
78-
79-
private function createProphecy()
80-
{
81-
return $this->prophesize(SomeModel::class);
82-
}
83-
8457
}
8558
```
8659

@@ -95,13 +68,6 @@ use PHPUnit\Framework;
9568

9669
final class ExampleTest extends Framework\TestCase
9770
{
98-
private $prophecy;
99-
100-
protected function setUp()
101-
{
102-
$this->prophecy = $this->prophesize()->willExtend(SomeModel::class);
103-
}
104-
10571
public function testSomething(): void
10672
{
10773
$prophecy = $this->prophesize()->willExtend(SomeModel::class);
@@ -110,25 +76,6 @@ final class ExampleTest extends Framework\TestCase
11076

11177
// ...
11278
}
113-
114-
public function testSomethingElse(): void
115-
{
116-
$testDouble = $this->prophecy->reveal();
117-
118-
// ...
119-
}
120-
121-
public function testSomethingDifferent(): void
122-
{
123-
$testDouble = $this->createProphecy()->reveal();
124-
125-
// ...
126-
}
127-
128-
private function createProphecy()
129-
{
130-
return $this->prophesize(SomeModel::class)->willExtend(SomeInterface::class);
131-
}
13279
}
13380
```
13481

@@ -143,13 +90,6 @@ use PHPUnit\Framework;
14390

14491
final class ExampleTest extends Framework\TestCase
14592
{
146-
private $prophecy;
147-
148-
protected function setUp()
149-
{
150-
$this->prophecy = $this->prophesize(SomeModel::class)->willImplement(SomeInterface::class);
151-
}
152-
15393
public function testSomething(): void
15494
{
15595
$prophecy = $this->prophesize(SomeModel::class)->willImplement(SomeInterface::class);
@@ -158,25 +98,6 @@ final class ExampleTest extends Framework\TestCase
15898

15999
// ...
160100
}
161-
162-
public function testSomethingElse(): void
163-
{
164-
$testDouble = $this->prophecy->reveal();
165-
166-
// ...
167-
}
168-
169-
public function testSomethingDifferent(): void
170-
{
171-
$testDouble = $this->createProphecy()->reveal();
172-
173-
// ...
174-
}
175-
176-
private function createProphecy()
177-
{
178-
return $this->prophesize(SomeModel::class)->willImplement(SomeInterface::class);
179-
}
180101
}
181102
```
182103

0 commit comments

Comments
 (0)