public function testWillNotIterateOverArray()
 {
     $array = $this->getMock(\ArrayObject::class);
     $array->expects($this->never())->method('key');
     $array->expects($this->never())->method('valid');
     $array->expects($this->never())->method('current');
     $array->expects($this->never())->method('next');
     $array->expects($this->never())->method('rewind');
     $array->expects($this->never())->method('getIterator');
     $this->typedCheck->validate($array, new Array_());
     $this->typedCheck->simulateFailure($array, new Array_());
 }
 public function testRejectsValidationOfInvalidType()
 {
     $this->setExpectedException(\InvalidArgumentException::class);
     $this->typedCheck->validate('foo', new String_());
 }