Mock.php

Go to the documentation of this file.
00001 <?php
00002 
00031 class Robo47_Validate_Mock implements Zend_Validate_Interface
00032 {
00033 
00038     public $isValid = true;
00043     public $errors = array();
00048     public $messages = array();
00053     public $lastValue = null;
00054 
00061     public function __construct($isValid = true, array $messages = array(),
00062         array $errors = array())
00063     {
00064         $this->isValid = $isValid;
00065         $this->errors = $errors;
00066         $this->messages = $messages;
00067     }
00068 
00074     public function getErrors()
00075     {
00076         return $this->errors;
00077     }
00078 
00084     public function getMessages()
00085     {
00086         return $this->messages;
00087     }
00088 
00094     public function isValid($value)
00095     {
00096         $this->lastValue = $value;
00097         return $this->isValid;
00098     }
00099 }