1
0
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:
Niklas Keller 2017-03-14 22:36:24 +01:00
parent 73149b933f
commit 45ea818883

View File

@ -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 () {});
}
}