public function expandGenericPathPatternTests($package, $subPackage, $controller, $format, $templateRootPath, array $templateRootPaths = null, $partialRootPath, array $partialRootPaths = null, $layoutRootPath, array $layoutRootPaths = null, $bubbleControllerAndSubpackage, $formatIsOptional, $pattern, $expectedResult)
{
$options = [];
if ($templateRootPath !== null) {
$options['templateRootPath'] = $templateRootPath;
}
if ($templateRootPaths !== null) {
$options['templateRootPaths'] = $templateRootPaths;
}
if ($partialRootPath !== null) {
$options['partialRootPath'] = $partialRootPath;
}
if ($partialRootPaths !== null) {
$options['partialRootPaths'] = $partialRootPaths;
}
if ($layoutRootPath !== null) {
$options['layoutRootPath'] = $layoutRootPath;
}
if ($layoutRootPaths !== null) {
$options['layoutRootPaths'] = $layoutRootPaths;
}
/** @var TemplatePaths $templatePaths */
$templatePaths = $this->getAccessibleMock(TemplatePaths::class, ['dummy'], [$options], '', true);
$patternReplacementVariables = ['packageKey' => $package, 'subPackageKey' => $subPackage, 'controllerName' => $controller, 'format' => $format];
$actualResult = $templatePaths->_call('expandGenericPathPattern', $pattern, $patternReplacementVariables, $bubbleControllerAndSubpackage, $formatIsOptional);
$this->assertEquals($expectedResult, $actualResult);
}