mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fix Console Model test to correct index changes for validation.
This commit is contained in:
parent
b22b3b1f41
commit
4b919382bb
1 changed files with 3 additions and 3 deletions
|
@ -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/')));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue