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