Syntax error fix
This commit is contained in:
parent
2e3f800265
commit
7bb07a5be1
@ -805,7 +805,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
|
||||
case 'object':
|
||||
$a[$v] = serialize($this->data[$v]);
|
||||
break;;
|
||||
case 'enum'
|
||||
case 'enum':
|
||||
$a[$v] = $this->table->enumIndex($v,$this->data[$v]);
|
||||
break;
|
||||
default:
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
class Doctrine_ValidatorTestCase extends Doctrine_UnitTestCase {
|
||||
public function prepareTables() {
|
||||
$this->tables[] = "Validator_Test";
|
||||
$this->tables[] = "ValidatorTest";
|
||||
parent::prepareTables();
|
||||
}
|
||||
public function testIsValidType() {
|
||||
@ -70,7 +70,7 @@ class Doctrine_ValidatorTestCase extends Doctrine_UnitTestCase {
|
||||
}
|
||||
|
||||
public function testValidate2() {
|
||||
$test = new Validator_Test();
|
||||
$test = new ValidatorTest();
|
||||
$test->mymixed = "message";
|
||||
|
||||
$validator = new Doctrine_Validator();
|
||||
@ -79,8 +79,9 @@ class Doctrine_ValidatorTestCase extends Doctrine_UnitTestCase {
|
||||
$stack = $validator->getErrorStack();
|
||||
|
||||
$this->assertTrue(is_array($stack));
|
||||
$this->assertTrue(isset($stack['ValidatorTest'][0]));
|
||||
$stack = $stack['ValidatorTest'][0];
|
||||
|
||||
$stack = $stack['Validator_Test'][0];
|
||||
|
||||
$this->assertEqual($stack['mystring'], Doctrine_Validator::ERR_NOTNULL);
|
||||
$this->assertEqual($stack['myemail2'], Doctrine_Validator::ERR_NOTBLANK);
|
||||
|
@ -390,7 +390,7 @@ class Log_Status extends Doctrine_Record {
|
||||
$this->hasColumn("name", "string", 255);
|
||||
}
|
||||
}
|
||||
class Validator_Test extends Doctrine_Record {
|
||||
class ValidatorTest extends Doctrine_Record {
|
||||
public function setTableDefinition() {
|
||||
$this->hasColumn("mymixed","string", 100);
|
||||
$this->hasColumn("mystring","string", 100, "notnull|unique");
|
||||
|
Loading…
Reference in New Issue
Block a user