1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-04 18:47:50 +01:00
parallel/test/Worker/ProcessPoolTest.php
2016-08-18 17:36:58 -05:00

20 lines
510 B
PHP

<?php
namespace Amp\Concurrent\Test\Worker;
use Amp\Concurrent\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);
}
}