public function testItHasLengthThrowsException() { $array = new \SplFixedArray(2); $array[0] = 'some-value'; $array[1] = 'last-value'; $this->setExpectedException(Exception::class); Assert::hasLength($array, 100); }
public function testHasLengthWillThrowException() { $this->setExpectedException(Exception::class); $value = 'abcdefgh'; $length = 5; Assert::hasLength($value, $length); }