Ejemplo n.º 1
0
 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'));
 }
Ejemplo n.º 2
0
 /**
  * @expectedException Zend\Validator\Exception\InvalidArgumentException
  */
 public function testUriHandlerInvalidTypeThrowsException()
 {
     $this->validator->setUriHandler(new \stdClass());
 }