1
0
mirror of synced 2024-12-04 18:56:06 +03:00

Removing irrelevant tests (as per discussion with @guilhermeblanco and @stof

This commit is contained in:
Marco Pivetta 2015-04-03 15:27:13 +01:00
parent d49c907934
commit 95b128ce8f

View File

@ -83,39 +83,4 @@ class PersistentCollectionTest extends OrmTestCase
$this->collection->next();
$this->assertTrue($this->collection->isInitialized());
}
public function testAcceptsArrayAsConstructorArgument()
{
$metadata = $this->_emMock->getClassMetadata('Doctrine\Tests\Models\ECommerce\ECommerceCart');
$collection = new PersistentCollection($this->_emMock, $metadata, []);
$this->assertEmpty($collection);
$this->tryGenericCollectionOperations($collection);
}
public function testAcceptsNullAsConstructorArgument()
{
$metadata = $this->_emMock->getClassMetadata('Doctrine\Tests\Models\ECommerce\ECommerceCart');
$collection = new PersistentCollection($this->_emMock, $metadata, null);
$this->assertEmpty($collection);
$this->tryGenericCollectionOperations($collection);
}
private function tryGenericCollectionOperations(Collection $collection)
{
$count = count($collection);
$object = new \stdClass();
$collection->add($object);
$this->assertTrue($collection->contains($object));
$this->assertCount($count + 1, $collection);
$collection->removeElement($object);
$this->assertCount($count, $collection);
}
}