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

65 lines
1.6 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);
2009-12-18 15:30:19 +03:00
$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 {
/**
2010-04-10 02:00:36 +04:00
* @Id @Column(type="integer") @GeneratedValue
2009-12-18 15:30:19 +03:00
* @var integer
*/
public $id;
2010-04-10 02:00:36 +04:00
/** @Column */
2009-12-18 15:30:19 +03:00
public $property;
}
abstract class DDC144Expression extends DDC144FlowElement {
abstract function method();
}
2010-04-10 02:00:36 +04:00
2009-12-18 15:30:19 +03:00
/** @Entity @Table(name="ddc144_operands") */
class DDC144Operand extends DDC144Expression {
2010-04-10 02:00:36 +04:00
/** @Column */
2009-12-18 15:30:19 +03:00
public $operandProperty;
function method() {}
}