mirror of
https://github.com/danog/parallel.git
synced 2024-12-02 17:52:14 +01:00
20 lines
504 B
PHP
20 lines
504 B
PHP
<?php
|
|
|
|
namespace Amp\Parallel\Test\Worker;
|
|
|
|
use Amp\Parallel\Worker\{ DefaultPool, WorkerFactory, WorkerProcess };
|
|
|
|
/**
|
|
* @group process
|
|
*/
|
|
class ProcessPoolTest extends AbstractPoolTest {
|
|
protected function createPool($min = null, $max = null) {
|
|
$factory = $this->createMock(WorkerFactory::class);
|
|
$factory->method('create')->will($this->returnCallback(function () {
|
|
return new WorkerProcess;
|
|
}));
|
|
|
|
return new DefaultPool($min, $max, $factory);
|
|
}
|
|
}
|