mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 05:47:11 +02:00
Implemented branch test for treesourceservice
This commit is contained in:
@@ -21,9 +21,10 @@ class TreeSourceServiceTest extends TestCase
|
||||
$tree1 = new TreeCollectionSource();
|
||||
$tree2 = new TreeCollectionSource();
|
||||
$tree3 = new TreeCollectionSource();
|
||||
$tree4 = new TreeCollectionSource();
|
||||
$leave1 = $this->createMock(SourceInterface::class);
|
||||
$leave2 = $this->createMock(SourceInterface::class);
|
||||
$collection = new ArrayCollection([$tree2,$tree3,$leave1,$leave2]);
|
||||
$collection = new ArrayCollection([$tree2,$tree3,$leave1,$leave2,$tree4]);
|
||||
$tree1->setCollection($collection);
|
||||
$this->treeService = new TreeSourceService($tree1);
|
||||
}
|
||||
@@ -31,5 +32,9 @@ class TreeSourceServiceTest extends TestCase
|
||||
public function testGetLeaves():void{
|
||||
$this->assertEquals(2, $this->treeService->getLeaves()->count());
|
||||
}
|
||||
|
||||
public function testGetBranches():void{
|
||||
$this->assertEquals(3, $this->treeService->getBranches()->count());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user