1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-02 09:37:57 +01:00
parallel/tests/Worker/ForkPoolTest.php
2016-01-23 00:00:56 -06:00

22 lines
535 B
PHP

<?php
namespace Icicle\Tests\Concurrent\Worker;
use Icicle\Concurrent\Worker\{DefaultPool, WorkerFactory, WorkerFork};
/**
* @group forking
* @requires extension pcntl
*/
class ForkPoolTest extends AbstractPoolTest
{
protected function createPool($min = null, $max = null)
{
$factory = $this->getMock(WorkerFactory::class);
$factory->method('create')->will($this->returnCallback(function () {
return new WorkerFork();
}));
return new DefaultPool($min, $max, $factory);
}
}