mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Fix ModelTaskTest for tests passing
This commit is contained in:
parent
043858d9e6
commit
7944f512ad
1 changed files with 5 additions and 5 deletions
|
@ -315,7 +315,7 @@ class ModelTaskTest extends CakeTestCase {
|
|||
$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 @@ class ModelTaskTest extends CakeTestCase {
|
|||
$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 @@ class ModelTaskTest extends CakeTestCase {
|
|||
$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 @@ class ModelTaskTest extends CakeTestCase {
|
|||
$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 @@ class ModelTaskTest extends CakeTestCase {
|
|||
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';
|
||||
|
|
Loading…
Add table
Reference in a new issue