public function testUriHandlerThrowsExceptionInParseMethodNotValid() { $uriMock = $this->getMock('Zend\\Uri\\Uri'); $uriMock->expects($this->once())->method('parse')->will($this->throwException(new InvalidArgumentException())); $this->validator->setUriHandler($uriMock); $this->assertFalse($this->validator->isValid('uri')); }
/** * @expectedException Zend\Validator\Exception\InvalidArgumentException */ public function testUriHandlerInvalidTypeThrowsException() { $this->validator->setUriHandler(new \stdClass()); }