mirror of
https://github.com/danog/parallel-functions.git
synced 2024-11-30 04:39:03 +01:00
21 lines
504 B
PHP
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;
|
|
});
|
|
}
|
|
}
|