From 8937c0f084eefb928032b438f0f57ad5cba3dbdc Mon Sep 17 00:00:00 2001 From: sasezaki Date: Thu, 21 Nov 2024 22:41:50 +0900 Subject: [PATCH] minimize README code example (#353) --- README.md | 79 ------------------------------------------------------- 1 file changed, 79 deletions(-) diff --git a/README.md b/README.md index 21b20e7..25cf9a7 100644 --- a/README.md +++ b/README.md @@ -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); @@ -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); - } - } ``` @@ -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); @@ -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); - } } ``` @@ -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); @@ -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); - } } ```