mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixed wrong passing of $expected and $results in model task test.
This commit is contained in:
parent
8ef7016545
commit
bf37054bca
1 changed files with 7 additions and 7 deletions
|
@ -197,31 +197,31 @@ class ModelTaskTest extends CakeTestCase {
|
||||||
|
|
||||||
$result = $this->Task->fieldValidation('text', array('type' => 'string', 'length' => 10, 'null' => false));
|
$result = $this->Task->fieldValidation('text', array('type' => 'string', 'length' => 10, 'null' => false));
|
||||||
$expected = array('notempty' => 'notempty');
|
$expected = array('notempty' => 'notempty');
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($expected, $result);
|
||||||
|
|
||||||
$result = $this->Task->fieldValidation('text', array('type' => 'date', 'length' => 10, 'null' => false));
|
$result = $this->Task->fieldValidation('text', array('type' => 'date', 'length' => 10, 'null' => false));
|
||||||
$expected = array('date' => 'date');
|
$expected = array('date' => 'date');
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($expected, $result);
|
||||||
|
|
||||||
$result = $this->Task->fieldValidation('text', array('type' => 'time', 'length' => 10, 'null' => false));
|
$result = $this->Task->fieldValidation('text', array('type' => 'time', 'length' => 10, 'null' => false));
|
||||||
$expected = array('time' => 'time');
|
$expected = array('time' => 'time');
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($expected, $result);
|
||||||
|
|
||||||
$result = $this->Task->fieldValidation('email', array('type' => 'string', 'length' => 10, 'null' => false));
|
$result = $this->Task->fieldValidation('email', array('type' => 'string', 'length' => 10, 'null' => false));
|
||||||
$expected = array('email' => 'email');
|
$expected = array('email' => 'email');
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($expected, $result);
|
||||||
|
|
||||||
$result = $this->Task->fieldValidation('test', array('type' => 'integer', 'length' => 10, 'null' => false));
|
$result = $this->Task->fieldValidation('test', array('type' => 'integer', 'length' => 10, 'null' => false));
|
||||||
$expected = array('numeric' => 'numeric');
|
$expected = array('numeric' => 'numeric');
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($expected, $result);
|
||||||
|
|
||||||
$result = $this->Task->fieldValidation('test', array('type' => 'boolean', 'length' => 10, 'null' => false));
|
$result = $this->Task->fieldValidation('test', array('type' => 'boolean', 'length' => 10, 'null' => false));
|
||||||
$expected = array('boolean' => 'boolean');
|
$expected = array('boolean' => 'boolean');
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($expected, $result);
|
||||||
|
|
||||||
$result = $this->Task->fieldValidation('test', array('type' => 'string', 'length' => 36, 'null' => false));
|
$result = $this->Task->fieldValidation('test', array('type' => 'string', 'length' => 36, 'null' => false));
|
||||||
$expected = array('uuid' => 'uuid');
|
$expected = array('uuid' => 'uuid');
|
||||||
$this->assertEqual($result, $expected);
|
$this->assertEqual($expected, $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue