mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 22:17:26 +01:00
Implemented test to validate if add works correct with collection attribut
This commit is contained in:
parent
f377fb5705
commit
3e3d9ae044
@ -33,4 +33,11 @@ class CollectionAttributTest extends TestCase
|
||||
$this->assertNull($this->collection->setCollection($collection));
|
||||
$this->assertEquals($collection, $this->collection->getCollection());
|
||||
}
|
||||
|
||||
public function testAdd():void{
|
||||
$mock = new class{};
|
||||
$this->collection->setCollection(new ArrayCollection());
|
||||
$this->assertTrue($this->collection->getCollection()->add($mock));
|
||||
$this->assertEquals($mock, $this->collection->getCollection()->get(0));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user