public function testFindModifiesCache(): void
{ $this->twig->
expects(static::
once())->
method('getCache'
)->
willReturn($this->
createMock(FilesystemCache::
class));
$this->twig->
expects(static::
once())->
method('setCache'
)->
with(static::
callback(static function DConfigurableFilesystemCache
$cache) { $hash =
$cache->
generateKey('foo', 'bar'
);
$cache->
setTemplateScopes(['foo'
]);
// template scope has been set
static::
assertEquals($hash,
$cache->
generateKey('foo', 'bar'
));
// config hash had been set as well
$cache->
setConfigHash(''
);
return $hash !==
$cache->
generateKey('foo', 'bar'
);
}));
$this->templateScopeDetector->
expects(static::
once())->
method('getScopes'
)->
willReturn(['foo'
]);
$this->finder->
find('', true
);
} /**
* @return iterable<string, array<int, string>>
*/
public static function templateNameProvider(): iterable
{