Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/7495'
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed May 7, 2015
162 parents 4ada343 + 795693d + bcf0eb7 + df35d8a + c0d4707 + fb9dce0 + c45b896 + 739e942 + 29a4517 + 3179585 + ae205d0 + 6d3ab5a + 5b7a64f + 7591112 + 7610b9a + f91c471 + acef74d + d753e94 + 7a829bf + 3b93376 + 6c2eca4 + 48bc01e + 3c88cd5 + fbfc750 + 441b9de + b57e2b9 + 2beef92 + 3ae4add + 994832b + 6db3cde + e0f83ee + 712223d + 3b4ec35 + e53a267 + 51bf3c7 + 10a1e95 + 30ee303 + 96417b9 + 50ea13f + 24d1c0c + b09295e + 13758aa + 99316f8 + 40b8ac3 + e284e0b + 8ff51b4 + 4b5ea1e + 5b24371 + ed932b6 + 357852d + 262e5d6 + 9057a3f + 0e1e846 + 5d11876 + 0ae0984 + 6ff135c + 0b45aba + 1778b0c + a574713 + ba3f132 + 56365a6 + 019f89a + b09b3ba + 2af32d0 + cb39fc7 + 3f8a6fd + 8999753 + a7cd86b + da1c469 + 5371cdb + fd9f625 + 99d3fcd + 1e3ed17 + a360459 + 1a1e9aa + 4c8955c + 94f2feb + 5b450ef + e64e5b0 + e9d19a6 + a5a9b6e + 5e59c3a + a47f2db + 3cf915a + a2a5c91 + 1cd3439 + ef9c643 + 298a619 + 001ae99 + c37ab8e + 017f6f1 + 0711f77 + 38af804 + 23120b4 + 5f96f53 + a257169 + 8085bc4 + 3110cd4 + f270d41 + 9536f09 + 4ec1292 + adcdd78 + e80fff6 + 99fc5ce + 1d23e94 + fa167cb + a93e92f + 13a2df8 + 06689fb + 2d601eb + 72a3295 + a59f42c + 0f4489d + b3f7029 + 3c492ce + 259bcdc + a811ae5 + f66f985 + 173e949 + b93077e + f11a10d + 5ac4be0 + cb31aff + d34bdbb + 725b978 + 27b423e + 624ac5e + a3340ac + 80ab2e3 + 3429053 + 998a6d7 + 8b9ab71 + d4dffb0 + 5456435 + 97180fa + 126be7f + c16eb72 + 8ccb096 + 50481b9 + 411738a + 50b5c0b + 0721376 + ca3399f + 5abf474 + 7783b57 + a53deb5 + c8885be + 1adf3e3 + 5a45e41 + 3370b44 + b4caa32 + 2a7fc79 + 755e064 + fde42e0 + fb9bce8 + 3ff447c + 7cbed25 + 61aff3c + a27b9cd + 7ec5645 + 7ebdf61 + ca14cfc commit 61b29f1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public function contentSent()
*/
public function setErrorLevel($errorLevel)
{
if (is_string($errorLevel) && !ctype_digit($errorLevel)) {
return $this;
}

$this->setMetadata('errorLevel', $errorLevel);
return $this;
}
Expand Down
19 changes: 19 additions & 0 deletions test/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,25 @@ public function testSetContent()
$this->assertEquals($this->response, $this->response->sendContent());
}

public function testGetErrorLevelDefault()
{
$this->assertSame(0, $this->response->getErrorLevel());
}

public function testSetErrorLevel()
{
$errorLevel = 2;
$this->response->setErrorLevel($errorLevel);
$this->assertSame($errorLevel, $this->response->getErrorLevel());
}

public function testSetErrorLevelWithNonIntValueIsNotSet()
{
$errorLevel = '2String';
$this->response->setErrorLevel($errorLevel);
$this->assertSame(0, $this->response->getErrorLevel());
}

/*
public function testSetContentWithExit()
{
Expand Down

0 comments on commit 61b29f1

Please sign in to comment.