Skip to content

Commit

Permalink
minimize README code example (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
sasezaki authored Nov 21, 2024
1 parent 6e24e8f commit 8937c0f
Showing 1 changed file with 0 additions and 79 deletions.
79 changes: 0 additions & 79 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,6 @@ use PHPUnit\Framework;

final class ExampleTest extends Framework\TestCase
{
private $prophecy;

protected function setUp()
{
$this->prophecy = $this->prophesize(SomeModel::class);
}

public function testSomething(): void
{
$prophecy = $this->prophesize(SomeModel::class);
Expand All @@ -61,26 +54,6 @@ final class ExampleTest extends Framework\TestCase

// ...
}

public function testSomethingElse(): void
{
$testDouble = $this->prophecy->reveal();

// ...
}

public function testSomethingDifferent(): void
{
$testDouble = $this->createProphecy()->reveal();

// ...
}

private function createProphecy()
{
return $this->prophesize(SomeModel::class);
}

}
```

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

final class ExampleTest extends Framework\TestCase
{
private $prophecy;

protected function setUp()
{
$this->prophecy = $this->prophesize()->willExtend(SomeModel::class);
}

public function testSomething(): void
{
$prophecy = $this->prophesize()->willExtend(SomeModel::class);
Expand All @@ -110,25 +76,6 @@ final class ExampleTest extends Framework\TestCase

// ...
}

public function testSomethingElse(): void
{
$testDouble = $this->prophecy->reveal();

// ...
}

public function testSomethingDifferent(): void
{
$testDouble = $this->createProphecy()->reveal();

// ...
}

private function createProphecy()
{
return $this->prophesize(SomeModel::class)->willExtend(SomeInterface::class);
}
}
```

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

final class ExampleTest extends Framework\TestCase
{
private $prophecy;

protected function setUp()
{
$this->prophecy = $this->prophesize(SomeModel::class)->willImplement(SomeInterface::class);
}

public function testSomething(): void
{
$prophecy = $this->prophesize(SomeModel::class)->willImplement(SomeInterface::class);
Expand All @@ -158,25 +98,6 @@ final class ExampleTest extends Framework\TestCase

// ...
}

public function testSomethingElse(): void
{
$testDouble = $this->prophecy->reveal();

// ...
}

public function testSomethingDifferent(): void
{
$testDouble = $this->createProphecy()->reveal();

// ...
}

private function createProphecy()
{
return $this->prophesize(SomeModel::class)->willImplement(SomeInterface::class);
}
}
```

Expand Down

0 comments on commit 8937c0f

Please sign in to comment.