示例#1
0
文件: UriTest.php 项目: Rovak/zf2
 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'));
 }
示例#2
0
 /**
  * @expectedException Zend\Validator\Exception\InvalidArgumentException
  */
 public function testUriHandlerInvalidTypeThrowsException()
 {
     $this->validator->setUriHandler(new \stdClass());
 }