Fix Console Model test to correct index changes for validation.

This commit is contained in:
predominant 2010-04-11 09:19:30 +10:00
parent b22b3b1f41
commit 4b919382bb

View file

@ -215,9 +215,9 @@ class ModelTaskTest extends CakeTestCase {
public function testInteractiveFieldValidation() {
$this->Task->initValidations();
$this->Task->interactive = true;
$this->Task->setReturnValueAt(0, 'in', '19');
$this->Task->setReturnValueAt(0, 'in', '20');
$this->Task->setReturnValueAt(1, 'in', 'y');
$this->Task->setReturnValueAt(2, 'in', '15');
$this->Task->setReturnValueAt(2, 'in', '16');
$this->Task->setReturnValueAt(3, 'in', 'n');
$result = $this->Task->fieldValidation('text', array('type' => 'string', 'length' => 10, 'null' => false));
@ -234,7 +234,7 @@ class ModelTaskTest extends CakeTestCase {
$this->Task->initValidations();
$this->Task->interactive = true;
$this->Task->setReturnValueAt(0, 'in', '999999');
$this->Task->setReturnValueAt(1, 'in', '19');
$this->Task->setReturnValueAt(1, 'in', '20');
$this->Task->setReturnValueAt(2, 'in', 'n');
$this->Task->expectAt(4, 'out', array(new PatternExpectation('/make a valid/')));