1
0
mirror of synced 2025-01-21 07:41:41 +03:00

do not initialize coll on add()

This commit is contained in:
Austin Morris 2013-07-22 18:54:02 -04:00
parent 6bae2eac29
commit 1c8ae50557
2 changed files with 0 additions and 11 deletions

View File

@ -587,8 +587,6 @@ final class PersistentCollection implements Collection, Selectable
*/
public function add($value)
{
$this->initialize();
$this->coll->add($value);
$this->changed();

View File

@ -35,15 +35,6 @@ class PersistentCollectionFunctionalTest extends OrmFunctionalTestCase
$this->collection->setOwner(new ECommerceCart(), $classMetaData->getAssociationMapping('products'));
}
/**
* Test that PersistentCollection::add() initializes the collection.
*/
public function testAddInitializesCollection()
{
$this->collection->add(new ECommerceProduct);
$this->assertTrue($this->collection->isInitialized());
}
/**
* Test that PersistentCollection::current() initializes the collection.
*/