diff --git a/src/ContextBuilder.php b/src/ContextBuilder.php index 22cd78b..b83b70a 100644 --- a/src/ContextBuilder.php +++ b/src/ContextBuilder.php @@ -32,13 +32,6 @@ class ContextBuilder return $instance; } - public function withWorkers(Workers $workers): self - { - $instance = clone $this; - $instance->workers = $workers; - return $instance; - } - public function withCleanupInterval(Interval $interval): self { $instance = clone $this; diff --git a/src/Tests/ContextBuilderTest.php b/src/Tests/ContextBuilderTest.php index c888e9a..752f4f8 100644 --- a/src/Tests/ContextBuilderTest.php +++ b/src/Tests/ContextBuilderTest.php @@ -7,7 +7,6 @@ use React\EventLoop\LoopInterface; use Toalett\Multiprocessing\Concurrency; use Toalett\Multiprocessing\ContextBuilder; use Toalett\Multiprocessing\Tests\Tools\PropertyInspector; -use Toalett\Multiprocessing\Workers; class ContextBuilderTest extends TestCase { @@ -66,15 +65,4 @@ class ContextBuilderTest extends TestCase self::assertSame($concurrency, $usedConcurrency); } - - public function testWhenGivenWorkersItUsesThatWorkers(): void - { - $builder = ContextBuilder::create(); - $workers = $this->createMock(Workers::class); - - $context = $builder->withWorkers($workers)->build(); - $usedWorkers = $this->getProperty($context, 'workers'); - - self::assertSame($workers, $usedWorkers); - } }