1
0
mirror of synced 2024-12-15 07:36:03 +03:00
doctrine2/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC144Test.php

66 lines
1.7 KiB
PHP
Raw Normal View History

2009-12-18 15:30:19 +03:00
<?php
namespace Doctrine\Tests\ORM\Functional\Ticket;
require_once __DIR__ . '/../../../TestInit.php';
class DDC144Test extends \Doctrine\Tests\OrmFunctionalTestCase
{
protected function setUp() {
parent::setUp();
//$this->_em->getConnection()->getConfiguration()->setSqlLogger(new \Doctrine\DBAL\Logging\EchoSqlLogger);
$this->_schemaTool->createSchema(array(
$this->_em->getClassMetadata(__NAMESPACE__ . '\DDC144FlowElement'),
// $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC144Expression'),
$this->_em->getClassMetadata(__NAMESPACE__ . '\DDC144Operand'),
));
}
/**
* @group DDC-144
*/
public function testIssue()
{
$operand = new DDC144Operand;
$operand->property = 'flowValue';
$operand->operandProperty = 'operandValue';
$this->_em->persist($operand);
$this->_em->flush();
}
}
/**
* @Entity
* @Table(name="ddc144_flowelements")
* @InheritanceType("JOINED")
* @DiscriminatorColumn(type="string", name="discr")
* @DiscriminatorMap({"flowelement" = "DDC144FlowElement", "operand" = "DDC144Operand"})
*/
class DDC144FlowElement {
/**
* @Id @Column(type="integer") @GeneratedValue(strategy="AUTO")
* @var integer
*/
public $id;
/** @Column(type="string") */
public $property;
}
// /** @Entity @Table(name="ddc144_expressions") */
abstract class DDC144Expression extends DDC144FlowElement {
abstract function method();
}
/** @Entity @Table(name="ddc144_operands") */
class DDC144Operand extends DDC144Expression {
/** @Column(type="string") */
public $operandProperty;
function method() {}
}