diff --git a/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php b/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php index 190fe2ef1..ac4597b15 100644 --- a/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php +++ b/tests/Doctrine/Tests/ORM/PersistentCollectionTest.php @@ -90,10 +90,12 @@ class PersistentCollectionTest extends OrmTestCase { $this->setUpPersistentCollection(); - $this->collection->add('dummy'); + $dummy = new \stdClass(); + + $this->collection->add($dummy); $this->assertEquals([0], array_keys($this->collection->toArray())); - $this->collection->removeElement('dummy'); + $this->collection->removeElement($dummy); $this->assertEquals([], array_keys($this->collection->toArray())); } @@ -104,7 +106,7 @@ class PersistentCollectionTest extends OrmTestCase { $this->setUpPersistentCollection(); - $this->collection->add('dummy'); + $this->collection->add(new \stdClass()); $this->collection->clear(); $this->assertEquals([], array_keys($this->collection->toArray())); }