public function setUp() { $this->hostPoolProvider = $this->createHostPoolProviderMock(); $this->hostPool = $this->createHostPoolMock(); $this->hostPoolProvider->expects($this->any())->method('get')->will($this->returnValue($this->hostPool)); $this->guzzleClientMock = $this->createGuzzleClientMock(); $this->guzzleClientFactory = $this->createGuzzleClientFactoryMock(); }
/** * @return null */ private function buildCache() { $this->hosts = array(); $hostPool = $this->hostPoolProvider->get(); while ($hostPool->hasNext()) { $this->hosts[] = $hostPool->getNext(); } $this->createCacheTime = $this->clock->getTime(); $this->writeCacheToStorage(); }