parallel-functions/test/ParallelTest.php
2017-12-14 17:33:41 +01:00

21 lines
504 B
PHP

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