/** * Test fetching all leaves in the tree * @return void */ public function testGetAllLeaves() { $leaves = $this->tree->getAllLeaves(); $this->assertEquals(count($leaves), 3); /* @var $leaf Tree */ foreach ($leaves as $leaf) { $this->assertInstanceOf('Verdict\\Segment\\Tree', $leaf); } }