/**
  * @return void
  */
 public function testGetStringAtIndexWithFileBasedStrategy()
 {
     // force the file-based strategy by setting no memory limit
     $originalMemoryLimit = ini_get('memory_limit');
     ini_set('memory_limit', '-1');
     $resourcePath = $this->getResourcePath('sheet_with_lots_of_shared_strings.xlsx');
     $sharedStringsHelper = new SharedStringsHelper($resourcePath);
     $sharedStringsHelper->extractSharedStrings();
     $sharedString = $sharedStringsHelper->getStringAtIndex(0);
     $this->assertEquals('str', $sharedString);
     $sharedString = $sharedStringsHelper->getStringAtIndex(CachingStrategyFactory::MAX_NUM_STRINGS_PER_TEMP_FILE + 1);
     $this->assertEquals('str', $sharedString);
     $usedCachingStrategy = \ReflectionHelper::getValueOnObject($sharedStringsHelper, 'cachingStrategy');
     $this->assertTrue($usedCachingStrategy instanceof FileBasedStrategy);
     $sharedStringsHelper->cleanup();
     ini_set('memory_limit', $originalMemoryLimit);
 }