public function getLayoutPathAndFilenameThrowsExceptionIfResolvedPathPointsToADirectory()
{
vfsStreamWrapper::register();
mkdir('vfs://MyTemplates/NotAFile');
$paths = ['vfs://NonExistentDir/UnknownFile.html', 'vfs://MyTemplates/NotAFile'];
/** @var TemplatePaths $templatePaths */
$templatePaths = $this->getAccessibleMock(TemplatePaths::class, ['expandGenericPathPattern'], [['layoutPathAndFilenamePattern' => '@layoutRoot/@layout.@format']], '', true);
$templatePaths->expects($this->once())->method('expandGenericPathPattern')->with('@layoutRoot/@layout.@format', ['layout' => 'SomeLayout', 'format' => 'html'], true, true)->will($this->returnValue($paths));
$templatePaths->getLayoutSource('SomeLayout');
}