Skip to content
Permalink
Browse files

Fix ModelTaskTest for tests passing

  • Loading branch information...
chinpei215 committed Jan 29, 2017
1 parent 043858d commit 7944f512adc477f46912b59200f96c6e60642fcf
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php
@@ -315,7 +315,7 @@ public function testInteractiveFieldValidation() {
$this->Task->initValidations();
$this->Task->interactive = true;
$this->Task->expects($this->any())->method('in')
->will($this->onConsecutiveCalls('24', 'y', '18', 'n'));
->will($this->onConsecutiveCalls('26', 'y', '18', 'n'));
$result = $this->Task->fieldValidation('text', array('type' => 'string', 'length' => 10, 'null' => false));
$expected = array('notBlank' => 'notBlank', 'maxLength' => 'maxLength');
@@ -333,7 +333,7 @@ public function testInteractiveFieldValidationWithBogusResponse() {
$this->Task->interactive = true;
$this->Task->expects($this->any())->method('in')
->will($this->onConsecutiveCalls('999999', '24', 'n'));
->will($this->onConsecutiveCalls('999999', '26', 'n'));
$this->Task->expects($this->at(10))->method('out')
->with($this->stringContains('make a valid'));
@@ -368,7 +368,7 @@ public function testSkippingChoiceInteractiveFieldValidation() {
$this->Task->initValidations();
$this->Task->interactive = true;
$this->Task->expects($this->any())->method('in')
->will($this->onConsecutiveCalls('24', 'y', 's'));
->will($this->onConsecutiveCalls('26', 'y', 's'));
$result = $this->Task->fieldValidation('text', array('type' => 'string', 'length' => 10, 'null' => false));
$expected = array('notBlank' => 'notBlank', '_skipFields' => true);
@@ -384,7 +384,7 @@ public function testSkippingAnotherInteractiveFieldValidation() {
$this->Task->initValidations();
$this->Task->interactive = true;
$this->Task->expects($this->any())->method('in')
->will($this->onConsecutiveCalls('24', 's'));
->will($this->onConsecutiveCalls('26', 's'));
$result = $this->Task->fieldValidation('text', array('type' => 'string', 'length' => 10, 'null' => false));
$expected = array('notBlank' => 'notBlank', '_skipFields' => true);
@@ -400,7 +400,7 @@ public function testSkippingAnotherInteractiveFieldValidation() {
public function testInteractiveDoValidationWithSkipping() {
$this->Task->expects($this->any())
->method('in')
->will($this->onConsecutiveCalls('35', '24', 'n', '10', 's'));
->will($this->onConsecutiveCalls('37', '26', 'n', '10', 's'));
$this->Task->interactive = true;
$Model = $this->getMock('Model');
$Model->primaryKey = 'id';

0 comments on commit 7944f51

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