1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-02 17:52:14 +01:00
parallel/test/Worker/ProcessPoolTest.php

20 lines
504 B
PHP
Raw Normal View History

2016-12-30 02:16:04 +01:00
<?php
2016-08-23 23:47:40 +02:00
namespace Amp\Parallel\Test\Worker;
2016-08-18 18:04:48 +02:00
2016-08-23 23:47:40 +02:00
use Amp\Parallel\Worker\{ DefaultPool, WorkerFactory, WorkerProcess };
/**
* @group process
*/
2016-08-19 00:36:58 +02:00
class ProcessPoolTest extends AbstractPoolTest {
protected function createPool($min = null, $max = null) {
$factory = $this->createMock(WorkerFactory::class);
$factory->method('create')->will($this->returnCallback(function () {
2016-08-23 01:25:19 +02:00
return new WorkerProcess;
}));
return new DefaultPool($min, $max, $factory);
}
}