public function createUncachedSegmentAndProcessCacheSegmentsDoesWorkWithCacheSegmentTokensInContent()
{
$contentCache = new ContentCache();
$mockPropertyMapper = $this->createMock(PropertyMapper::class);
$mockPropertyMapper->expects($this->any())->method('convert')->will($this->returnArgument(0));
$this->inject($contentCache, 'propertyMapper', $mockPropertyMapper);
$this->inject($contentCache, 'parser', new CacheSegmentParser());
$mockCache = $this->createMock(FrontendInterface::class);
$this->inject($contentCache, 'cache', $mockCache);
$invalidContent = 'You should probably not use ' . ContentCache::CACHE_SEGMENT_START_TOKEN . ', ' . ContentCache::CACHE_SEGMENT_SEPARATOR_TOKEN . ' or ' . ContentCache::CACHE_SEGMENT_END_TOKEN . ' inside your uncached content.';
$content = $contentCache->createUncachedSegment($invalidContent, 'uncached.typoscript.path', array('node' => 'A node identifier'));
$output = $contentCache->processCacheSegments($content);
$this->assertSame($invalidContent, $output);
}