mirror of
https://github.com/danog/parallel.git
synced 2025-01-23 06:21:12 +01:00
23 lines
571 B
PHP
23 lines
571 B
PHP
<?php
|
|
namespace Icicle\Tests\Concurrent\Worker;
|
|
|
|
use Icicle\Concurrent\Worker\DefaultPool;
|
|
use Icicle\Concurrent\Worker\WorkerFactory;
|
|
use Icicle\Concurrent\Worker\WorkerProcess;
|
|
|
|
/**
|
|
* @group process
|
|
*/
|
|
class ProcessPoolTest extends AbstractPoolTest
|
|
{
|
|
protected function createPool($min = null, $max = null)
|
|
{
|
|
$factory = $this->getMock(WorkerFactory::class);
|
|
$factory->method('create')->will($this->returnCallback(function () {
|
|
return new WorkerProcess();
|
|
}));
|
|
|
|
return new DefaultPool($min, $max, $factory);
|
|
}
|
|
}
|