Commit 81b394cd authored by romanb's avatar romanb

more experiments with the new testsuite.

parent fd1fb574
......@@ -6,7 +6,7 @@ class Orm_Component_TestTest extends Doctrine_OrmTestCase
protected function setUp()
{
parent::setUp();
$this->loadFixture('forum', 'common', 'users');
$this->loadFixtures('forum', 'common', array('users', 'admins'));
}
public function testTest()
......
......@@ -4,11 +4,13 @@ $fixture = array(
'rows' => array(
array(
'id' => 1,
'username' => 'romanb'
'username' => 'romanb',
'dtype' => 'admin'
),
array(
'id' => 2,
'username' => 'jwage'
'username' => 'jwage',
'dtype' => 'user'
)
)
);
\ No newline at end of file
......@@ -8,15 +8,19 @@ class ForumUser extends Doctrine_Record
$class->setInheritanceType(Doctrine::INHERITANCETYPE_JOINED, array(
'discriminatorColumn' => 'dtype',
'discriminatorMap' => array(
1 => 'ForumUser',
2 => 'ForumAdministrator')
'user' => 'ForumUser',
'admin' => 'ForumAdministrator')
));
$class->setSubclasses(array('ForumAdministrator'));
// the discriminator column
$class->addMappedColumn('dtype', 'string', 50);
// property mapping
$class->addMappedColumn('id', 'integer', 4, array(
'primary' => true,
'autoincrement' => true));
$class->addMappedColumn('username', 'string', 50);
}
}
\ No newline at end of file
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