Remove unnecessary builder method
This commit is contained in:
parent
0a4865f597
commit
9e863cfc7f
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user