Commit 5b677545 authored by romanb's avatar romanb

[2.0] Simplifying code. Including OneToManyBidirectionalAssociation test in AllTests

parent 5bbc2a9e
......@@ -89,12 +89,10 @@ class ECommerceProduct
}
public function removeFeature(ECommerceFeature $feature) {
foreach ($this->features as $index => $current) {
if ($current === $feature) {
unset($this->features[$index]);
$current->removeProduct();
return true;
}
$removed = $this->features->removeElement($feature);
if ($removed !== null) {
$removed->removeProduct();
return true;
}
return false;
}
......
......@@ -28,6 +28,7 @@ class AllTests
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\QueryTest');
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\OneToOneUnidirectionalAssociationTest');
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\OneToOneBidirectionalAssociationTest');
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\OneToManyBidirectionalAssociationTest');
return $suite;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment