From b3e983abc3d9714de05425796268bf6df48bff3d Mon Sep 17 00:00:00 2001 From: meus Date: Wed, 15 Aug 2007 10:26:51 +0000 Subject: [PATCH] Added failing test for ColumnAggregation. Type field is not automaitcally set --- tests/ColumnAggregationInheritanceTestCase.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/ColumnAggregationInheritanceTestCase.php b/tests/ColumnAggregationInheritanceTestCase.php index 78f91fb3e..6a04c62d6 100644 --- a/tests/ColumnAggregationInheritanceTestCase.php +++ b/tests/ColumnAggregationInheritanceTestCase.php @@ -71,6 +71,13 @@ class Doctrine_ColumnAggregationInheritance_TestCase extends Doctrine_UnitTestCa $this->assertEqual($q->getSql(), "SELECT i.id AS i__id, i.name AS i__name, i.type AS i__type FROM inheritance_test i WHERE (i.type = 'type 1')"); } + + public function testSubclassFieldSetWhenCreatingNewSubclassedRecord() + { + $child = new InheritanceChildTest(); + $this->assertTrue(isset($child->type)); + $this->assertEqual("type 1", $child->type); + } } class InheritanceTest extends Doctrine_Record {