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

33 lines
953 B
PHP
Raw Normal View History

<?php
namespace Doctrine\Tests\ORM\Functional\Ticket;
use Doctrine\Common\Collections\ArrayCollection;
require_once __DIR__ . '/../../../TestInit.php';
/**
* @group DDC-1041
*/
class DDC1041Test extends \Doctrine\Tests\OrmFunctionalTestCase
{
public function setUp()
{
$this->useModelSet('company');
parent::setUp();
}
2011-12-20 01:56:19 +04:00
public function testGrabWrongSubtypeReturnsNull()
{
$fix = new \Doctrine\Tests\Models\Company\CompanyFixContract();
$fix->setFixPrice(2000);
2011-12-20 01:56:19 +04:00
$this->_em->persist($fix);
$this->_em->flush();
2011-12-20 01:56:19 +04:00
$id = $fix->getId();
2011-12-20 01:56:19 +04:00
$this->assertNull($this->_em->find('Doctrine\Tests\Models\Company\CompanyFlexContract', $id));
$this->assertNull($this->_em->getReference('Doctrine\Tests\Models\Company\CompanyFlexContract', $id));
$this->assertNull($this->_em->getPartialReference('Doctrine\Tests\Models\Company\CompanyFlexContract', $id));
}
}