public function testWarmUpCache() { $provider = $this->getProviderMock(); $provider->expects($this->once())->method('warmUpCache'); $default = $this->getProviderMock(); $default->expects($this->once())->method('warmUpCache'); $this->provider->addProvider($provider); $this->provider->setDefaultProvider($default); $this->provider->warmUpCache(); }
/** * @return array */ protected function getBusinessUnitIds() { /** @var OwnerTree $tree */ $tree = $this->treeProvider->getTree(); $user = $this->getUser(); $result = []; $organizations = $user->getOrganizations(); foreach ($organizations as $organization) { $subBUIds = $tree->getUserSubordinateBusinessUnitIds($user->getId(), $organization->getId()); $result = array_merge($result, $subBUIds); } return array_unique($result); }