1
0
mirror of synced 2025-02-20 06:03:15 +03:00

DDC-762 - Added test for NULL association finding in OneToOne relations

This commit is contained in:
beberlei 2010-08-29 11:19:23 +02:00
parent 33d0bb454b
commit 0904bc5cc5

View File

@ -106,4 +106,20 @@ class OneToOneUnidirectionalAssociationTest extends \Doctrine\Tests\OrmFunctiona
)->fetchColumn();
$this->assertEquals($value, $foreignKey);
}
/**
* @group DDC-762
*/
public function testNullForeignKey()
{
$product = new ECommerceProduct();
$product->setName('Doctrine 2 Manual');
$this->_em->persist($product);
$this->_em->flush();
$product = $this->_em->find(get_class($product), $product->getId());
$this->assertNull($product->getShipping());
}
}