Commit 7bb07a5b authored by zYne's avatar zYne

Syntax error fix

parent 2e3f8002
......@@ -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:
......
<?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);
......@@ -136,7 +137,7 @@ class Doctrine_ValidatorTestCase extends Doctrine_UnitTestCase {
$this->assertFalse($validator->validate($email,"address","example@e..",null));
$this->assertFalse($validator->validate($email,"address","example@e..",null));
}
public function testSave() {
......
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment