Skip to content
Permalink
Browse files

Fix Console Model test to correct index changes for validation.

  • Loading branch information...
predominant committed Apr 10, 2010
1 parent b22b3b1 commit 4b919382bbf9190b086c0cc1b0dcc798331c9bf0
Showing with 3 additions and 3 deletions.
  1. +3 −3 cake/tests/cases/console/libs/tasks/model.test.php
@@ -215,9 +215,9 @@ public function testFieldValidationGuessing() {
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 @@ function testInteractiveFieldValidationWithBogusResponse() {
$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/')));

0 comments on commit 4b91938

Please sign in to comment.
You can’t perform that action at this time.