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