Skip to content

Commit 38cf2be

Browse files
author
Márk Sági-Kazár
committed
Add tests for unwrapping
1 parent fa614f1 commit 38cf2be

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

spec/FulfilledPromiseSpec.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,9 @@ function it_has_a_response(ResponseInterface $response)
6464
{
6565
$this->wait()->shouldReturn($response);
6666
}
67+
68+
function it_does_not_unwrap_a_value(ResponseInterface $response)
69+
{
70+
$this->wait(false)->shouldNotReturn($response);
71+
}
6772
}

spec/RejectedPromiseSpec.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,9 @@ function it_returns_an_exception()
7070
$this->beConstructedWith($exception);
7171
$this->shouldThrow($exception)->duringWait();
7272
}
73+
74+
function it_does_not_unwrap_a_value(ResponseInterface $response)
75+
{
76+
$this->shouldNotThrow('Exception')->duringWait(false);
77+
}
7378
}

0 commit comments

Comments
 (0)