mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
Test Amp\capture for non-promise
This commit is contained in:
parent
73149b933f
commit
45ea818883
@ -140,4 +140,9 @@ class CaptureTest extends \PHPUnit\Framework\TestCase {
|
||||
$this->assertSame($exception, $reason);
|
||||
$this->assertSame(-1, $result);
|
||||
}
|
||||
|
||||
public function testNonPromise() {
|
||||
$this->expectException(Amp\UnionTypeError::class);
|
||||
Amp\capture(42, \Error::class, function () {});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user