Neos\FluidAdaptor\Tests\Unit\View\TemplatePathsTest::expandGenericPathPatternTests PHP Method

expandGenericPathPatternTests() public method

public expandGenericPathPatternTests ( string $package, string $subPackage, string $controller, string $format, string $templateRootPath, array $templateRootPaths = null, string $partialRootPath, array $partialRootPaths = null, string $layoutRootPath, array $layoutRootPaths = null, boolean $bubbleControllerAndSubpackage, boolean $formatIsOptional, string $pattern, string $expectedResult )
$package string
$subPackage string
$controller string
$format string
$templateRootPath string
$templateRootPaths array
$partialRootPath string
$partialRootPaths array
$layoutRootPath string
$layoutRootPaths array
$bubbleControllerAndSubpackage boolean
$formatIsOptional boolean
$pattern string
$expectedResult string
    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);
    }