1
0
mirror of synced 2025-02-02 13:31:45 +03:00

#6613 #6614 correcting broken test that isn't using objects against a PersistentCollection

This commit is contained in:
Marco Pivetta 2017-08-11 15:14:42 +02:00
parent 5521d1f325
commit 9545bf9d8c
No known key found for this signature in database
GPG Key ID: 4167D3337FD9D629

View File

@ -90,10 +90,12 @@ class PersistentCollectionTest extends OrmTestCase
{ {
$this->setUpPersistentCollection(); $this->setUpPersistentCollection();
$this->collection->add('dummy'); $dummy = new \stdClass();
$this->collection->add($dummy);
$this->assertEquals([0], array_keys($this->collection->toArray())); $this->assertEquals([0], array_keys($this->collection->toArray()));
$this->collection->removeElement('dummy'); $this->collection->removeElement($dummy);
$this->assertEquals([], array_keys($this->collection->toArray())); $this->assertEquals([], array_keys($this->collection->toArray()));
} }
@ -104,7 +106,7 @@ class PersistentCollectionTest extends OrmTestCase
{ {
$this->setUpPersistentCollection(); $this->setUpPersistentCollection();
$this->collection->add('dummy'); $this->collection->add(new \stdClass());
$this->collection->clear(); $this->collection->clear();
$this->assertEquals([], array_keys($this->collection->toArray())); $this->assertEquals([], array_keys($this->collection->toArray()));
} }