This commit is contained in:
parent
93c4064679
commit
b064fe3d86
@ -35,6 +35,8 @@ class PersistentCollectionTest extends OrmTestCase
|
||||
parent::setUp();
|
||||
|
||||
$this->_emMock = EntityManagerMock::create(new ConnectionMock([], new DriverMock()));
|
||||
|
||||
$this->setUpPersistentCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -61,7 +63,6 @@ class PersistentCollectionTest extends OrmTestCase
|
||||
*/
|
||||
public function testCurrentInitializesCollection()
|
||||
{
|
||||
$this->setUpPersistentCollection();
|
||||
$this->collection->current();
|
||||
$this->assertTrue($this->collection->isInitialized());
|
||||
}
|
||||
@ -71,7 +72,6 @@ class PersistentCollectionTest extends OrmTestCase
|
||||
*/
|
||||
public function testKeyInitializesCollection()
|
||||
{
|
||||
$this->setUpPersistentCollection();
|
||||
$this->collection->key();
|
||||
$this->assertTrue($this->collection->isInitialized());
|
||||
}
|
||||
@ -81,7 +81,6 @@ class PersistentCollectionTest extends OrmTestCase
|
||||
*/
|
||||
public function testNextInitializesCollection()
|
||||
{
|
||||
$this->setUpPersistentCollection();
|
||||
$this->collection->next();
|
||||
$this->assertTrue($this->collection->isInitialized());
|
||||
}
|
||||
@ -91,8 +90,6 @@ class PersistentCollectionTest extends OrmTestCase
|
||||
*/
|
||||
public function testNonObjects()
|
||||
{
|
||||
$this->setUpPersistentCollection();
|
||||
|
||||
$this->assertEmpty($this->collection);
|
||||
|
||||
$this->collection->add("dummy");
|
||||
@ -115,8 +112,6 @@ class PersistentCollectionTest extends OrmTestCase
|
||||
*/
|
||||
public function testRemovingElementsAlsoRemovesKeys()
|
||||
{
|
||||
$this->setUpPersistentCollection();
|
||||
|
||||
$dummy = new \stdClass();
|
||||
|
||||
$this->collection->add($dummy);
|
||||
@ -131,8 +126,6 @@ class PersistentCollectionTest extends OrmTestCase
|
||||
*/
|
||||
public function testClearWillAlsoClearKeys()
|
||||
{
|
||||
$this->setUpPersistentCollection();
|
||||
|
||||
$this->collection->add(new \stdClass());
|
||||
$this->collection->clear();
|
||||
$this->assertEquals([], array_keys($this->collection->toArray()));
|
||||
@ -143,8 +136,6 @@ class PersistentCollectionTest extends OrmTestCase
|
||||
*/
|
||||
public function testClearWillAlsoResetKeyPositions()
|
||||
{
|
||||
$this->setUpPersistentCollection();
|
||||
|
||||
$dummy = new \stdClass();
|
||||
|
||||
$this->collection->add($dummy);
|
||||
@ -166,8 +157,6 @@ class PersistentCollectionTest extends OrmTestCase
|
||||
|
||||
$this->_emMock->setUnitOfWork($unitOfWork);
|
||||
|
||||
$this->setUpPersistentCollection();
|
||||
|
||||
$newElement = new \stdClass();
|
||||
$persistedElement = new \stdClass();
|
||||
|
||||
@ -203,8 +192,6 @@ class PersistentCollectionTest extends OrmTestCase
|
||||
|
||||
$this->_emMock->setUnitOfWork($unitOfWork);
|
||||
|
||||
$this->setUpPersistentCollection();
|
||||
|
||||
$newElement = new \stdClass();
|
||||
$newElementThatIsAlsoPersisted = new \stdClass();
|
||||
$persistedElement = new \stdClass();
|
||||
|
Loading…
x
Reference in New Issue
Block a user