Skip to content

Commit 9cb62d9

Browse files
committed
Add tests
1 parent 3950679 commit 9cb62d9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spec/Exception/BatchExceptionSpec.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@ function it_is_an_exception()
2222

2323
function it_has_a_result()
2424
{
25-
$this->getResult()->shouldReturn(null);
2625
$this->setResult($result = new BatchResult());
2726
$this->getResult()->shouldReturn($result);
2827
}
2928

29+
function it_throws_an_exception_if_the_result_is_already_set()
30+
{
31+
$this->getResult()->shouldHaveType('Http\Client\BatchResult');
32+
$this->shouldThrow('Http\Client\Exception\InvalidArgumentException')->duringSetResult(new BatchResult());
33+
}
34+
3035
function it_has_an_exception_for_a_request(RequestInterface $request, Exception $exception)
3136
{
3237
$this->getExceptionFor($request)->shouldReturn(null);

0 commit comments

Comments
 (0)