Skip to content

Commit

Permalink
DDC-762 - Added test for NULL association finding in OneToOne relations
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Aug 29, 2010
1 parent 33d0bb4 commit 0904bc5
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,20 @@ public function assertForeignKeyIs($value) {
)->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());
}
}

0 comments on commit 0904bc5

Please sign in to comment.