DDC-762 - Added test for NULL association finding in OneToOne relations
This commit is contained in:
parent
33d0bb454b
commit
0904bc5cc5
@ -106,4 +106,20 @@ class OneToOneUnidirectionalAssociationTest extends \Doctrine\Tests\OrmFunctiona
|
|||||||
)->fetchColumn();
|
)->fetchColumn();
|
||||||
$this->assertEquals($value, $foreignKey);
|
$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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user