Skip to content

Commit 1bb7900

Browse files
author
Márk Sági-Kazár
committed
Add some more tests
1 parent cd9351c commit 1bb7900

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
@@ -55,6 +55,11 @@ function it_returns_a_rejected_promise(RequestInterface $request, ResponseInterf
5555
$promise->shouldThrow($exception)->duringWait();
5656
}
5757

58+
function it_returns_itself_when_no_on_fulfilled_callback_is_passed()
59+
{
60+
$this->then()->shouldReturn($this);
61+
}
62+
5863
function it_is_in_fulfilled_state()
5964
{
6065
$this->getState()->shouldReturn(Promise::FULFILLED);

spec/RejectedPromiseSpec.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ function it_returns_a_rejected_promise()
5858
$promise->shouldThrow($exception)->duringWait();
5959
}
6060

61+
function it_returns_itself_when_no_on_rejected_callback_is_passed()
62+
{
63+
$this->then()->shouldReturn($this);
64+
}
65+
6166
function it_is_in_rejected_state()
6267
{
6368
$this->getState()->shouldReturn(Promise::REJECTED);

0 commit comments

Comments
 (0)