public function testGetTree()
 {
     $resources = ['resource1', 'resource2', 'resource3'];
     $mappedResources = ['mapped1', 'mapped2', 'mapped3'];
     $this->aclResourceProviderMock->expects($this->once())->method('getAclResources')->willReturn($resources);
     $this->integrationDataMock->expects($this->once())->method('mapResources')->willReturn($mappedResources);
     $this->assertEquals($mappedResources, $this->model->getTree());
 }
 public function testGetTree()
 {
     $this->webapiBlock = $this->getWebapiBlock();
     $resources = [1 => ['children' => [1, 2, 3]]];
     $this->aclResourceProvider->expects($this->once())->method('getAclResources')->will($this->returnValue($resources));
     $rootArray = "rootArrayValue";
     $this->integrationHelper->expects($this->once())->method('mapResources')->with([1, 2, 3])->will($this->returnValue($rootArray));
     $this->assertEquals($rootArray, $this->webapiBlock->getTree());
 }