Fixed wrong passing of $expected and $results in model task test.

This commit is contained in:
Thomas Ploch 2011-05-17 00:29:58 +02:00
parent 8ef7016545
commit bf37054bca

View file

@ -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);
} }
/** /**