diff --git a/tests/FunctionsTest.php b/tests/FunctionsTest.php index 61c2ab9..37e5ade 100644 --- a/tests/FunctionsTest.php +++ b/tests/FunctionsTest.php @@ -13,6 +13,7 @@ use ArrayIterator; use Closure; use Exception; +use InvalidArgumentException; use function Noz\collect, Noz\invoke, @@ -293,4 +294,20 @@ public function testNormalizeOffsetThrowsExceptionForInvalidOffset() { normalize_offset('chooochooo'); } + + /** + * @expectedException InvalidArgumentException + */ + public function testNormalizeOffsetWillThrowExceptionIfPassedNegativeOffsetWithoutCount() + { + normalize_offset(-10, null); + } + + /** + * @expectedException RuntimeException + */ + public function testGetCountThrowsExceptionOnInvalidInput() + { + normalize_offset('chooochooo'); + } }