Skip to content

Commit

Permalink
Code coverage ignore on failing to open body for response
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdowling committed Dec 31, 2012
1 parent a36307a commit d1ad61a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Message/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,11 @@ public function setResponseBody($body)
{
// Attempt to open a file for writing if a string was passed
if (is_string($body)) {
// @codeCoverageIgnoreStart
if (!($body = fopen($body, 'w+'))) {
throw new InvalidArgumentException('Could not open ' . $body . ' for writing');
}
// @codeCoverageIgnoreEnd
}

$this->responseBody = EntityBody::factory($body);
Expand Down

0 comments on commit d1ad61a

Please sign in to comment.