1
0
mirror of synced 2024-12-13 14:56:01 +03:00

Syntax error fix

This commit is contained in:
zYne 2006-09-04 06:27:27 +00:00
parent 2e3f800265
commit 7bb07a5be1
3 changed files with 7 additions and 6 deletions

View File

@ -805,7 +805,7 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
case 'object': case 'object':
$a[$v] = serialize($this->data[$v]); $a[$v] = serialize($this->data[$v]);
break;; break;;
case 'enum' case 'enum':
$a[$v] = $this->table->enumIndex($v,$this->data[$v]); $a[$v] = $this->table->enumIndex($v,$this->data[$v]);
break; break;
default: default:

View File

@ -1,7 +1,7 @@
<?php <?php
class Doctrine_ValidatorTestCase extends Doctrine_UnitTestCase { class Doctrine_ValidatorTestCase extends Doctrine_UnitTestCase {
public function prepareTables() { public function prepareTables() {
$this->tables[] = "Validator_Test"; $this->tables[] = "ValidatorTest";
parent::prepareTables(); parent::prepareTables();
} }
public function testIsValidType() { public function testIsValidType() {
@ -70,7 +70,7 @@ class Doctrine_ValidatorTestCase extends Doctrine_UnitTestCase {
} }
public function testValidate2() { public function testValidate2() {
$test = new Validator_Test(); $test = new ValidatorTest();
$test->mymixed = "message"; $test->mymixed = "message";
$validator = new Doctrine_Validator(); $validator = new Doctrine_Validator();
@ -79,8 +79,9 @@ class Doctrine_ValidatorTestCase extends Doctrine_UnitTestCase {
$stack = $validator->getErrorStack(); $stack = $validator->getErrorStack();
$this->assertTrue(is_array($stack)); $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['mystring'], Doctrine_Validator::ERR_NOTNULL);
$this->assertEqual($stack['myemail2'], Doctrine_Validator::ERR_NOTBLANK); $this->assertEqual($stack['myemail2'], Doctrine_Validator::ERR_NOTBLANK);

View File

@ -390,7 +390,7 @@ class Log_Status extends Doctrine_Record {
$this->hasColumn("name", "string", 255); $this->hasColumn("name", "string", 255);
} }
} }
class Validator_Test extends Doctrine_Record { class ValidatorTest extends Doctrine_Record {
public function setTableDefinition() { public function setTableDefinition() {
$this->hasColumn("mymixed","string", 100); $this->hasColumn("mymixed","string", 100);
$this->hasColumn("mystring","string", 100, "notnull|unique"); $this->hasColumn("mystring","string", 100, "notnull|unique");