parallel-functions/test/ParallelTest.php
2017-12-13 22:49:18 -06:00

20 lines
467 B
PHP

<?php
namespace Amp\ParallelFunctions\Test;
use Amp\PHPUnit\TestCase;
use function Amp\ParallelFunctions\parallel;
class ParallelTest extends TestCase {
/**
* @expectedException \Error
* @expectedExceptionMessage Serialization of closure failed
*/
public function testUnserializableClosure() {
$unserializable = new class {};
$callable = parallel(function () use ($unserializable) {
return 1;
});
}
}