Added code coverage blocks

This commit is contained in:
Alex Bilbie 2013-02-04 19:46:06 +00:00
parent c89a2346a8
commit 4a50af333d

View File

@ -13,7 +13,9 @@ class SecureKey
// We want to stop execution if the key fails because, well, that is bad. // We want to stop execution if the key fails because, well, that is bad.
if ($bytes === false || $strong === false) { if ($bytes === false || $strong === false) {
// @codeCoverageIgnoreStart
throw new \Exception('Error Generating Key'); throw new \Exception('Error Generating Key');
// @codeCoverageIgnoreEnd
} }
return substr(str_replace(array('/', '+', '='), '', base64_encode($bytes)), 0, $len); return substr(str_replace(array('/', '+', '='), '', base64_encode($bytes)), 0, $len);