public function testWarmUpCacheFilterConfigsByScope() { $config1 = new Config(new EntityConfigId('ownership', 'AcmeBundle\\Entity\\User')); $config2 = new Config(new EntityConfigId('ownership', 'AcmeBundle\\Entity\\Account')); $this->configProvider->expects($this->once())->method('getConfigs')->willReturn([$config1, $config2]); $this->securityConfigProvider->expects($this->atLeastOnce())->method('hasConfig')->willReturn(true); $securityConfig1 = $this->getMock('Oro\\Bundle\\EntityConfigBundle\\Config\\ConfigInterface'); $securityConfig1->expects($this->once())->method('get')->with('group_name')->willReturn(''); $securityConfig2 = $this->getMock('Oro\\Bundle\\EntityConfigBundle\\Config\\ConfigInterface'); $securityConfig2->expects($this->once())->method('get')->with('group_name')->willReturn('commerce'); $this->securityConfigProvider->expects($this->atLeastOnce())->method('getConfig')->will($this->onConsecutiveCalls($securityConfig1, $securityConfig2)); $this->cache->expects($this->once())->method('fetch')->with($this->equalTo('AcmeBundle\\Entity\\Account')); $this->provider->warmUpCache(); }