$this->
assertEquals($expected_access_result,
$this->originalTree
[8
]->access
);
$this->
assertEquals($expected_access_result,
$this->originalTree
[9
]->access
);
} /**
* Tests the flatten() tree manipulator.
*
* @covers ::flatten
*/
public function testFlatten() { $this->
mockTree();
$tree =
$this->defaultMenuTreeManipulators->
flatten($this->originalTree
);
$this->
assertEquals([1, 2, 5, 6, 8, 9
],
array_keys($this->originalTree
));
$this->
assertEquals([1, 2, 5, 6, 8, 9, 3, 4, 7
],
array_keys($tree));
} /**
* Tests the optimized node access checking.
*
* @covers ::checkNodeAccess
* @covers ::collectNodeLinks
* @covers ::checkAccess
*/