[2.0] Simplifying code. Including OneToManyBidirectionalAssociation test in AllTests
This commit is contained in:
parent
5bbc2a9e58
commit
5b67754595
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user