Esempio n. 1
0
 /**
  * Proxies to the underlying Builder class.
  *
  * @see Zend_Validate_Interface::getErrors()
  * @deprecated Since 1.5.0
  *
  * @return array
  */
 public function getErrors()
 {
     return $this->_builder->getErrors();
 }
Esempio n. 2
0
 public function testGetErrorsReturnsOnlyErrorCodes()
 {
     $testMsgs = array('field' => array('val' => array('reason' => 'Message')));
     $expected = array('field' => array('val' => array('reason')));
     $mockEm = $this->getMock('Zend_Validate_Builder_ErrorManager');
     $mockEm->expects($this->once())->method('getMessages')->will($this->returnValue($testMsgs));
     $zvb = new Zend_Validate_Builder();
     $zvb->setErrorManager($mockEm);
     $actual = $zvb->getErrors();
     $this->assertEquals($expected, $actual);
 }