This commit is contained in:
parent
d44e6e1a9e
commit
031e79e726
1 changed files with 5 additions and 3 deletions
|
@ -115,10 +115,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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +131,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()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue