testViewPath); return [ [ $alias . '/test', $aliasPath . '/test.php', ], [ $alias . '/test.tpl', $aliasPath . '/test.tpl', ], [ 'contact/html', $viewPath . '/contact/html.php', ], [ 'contact/html.tpl', $viewPath . '/contact/html.tpl', ], ]; } /** * @dataProvider dataProviderFindViewFile * * @param string $view * @param string $expectedFileName */ public function testFindViewFile($view, $expectedFileName) { $viewResolver = new ViewResolver(); $viewResolver->viewPath = $this->testViewPath; $fileName = $viewResolver->findViewFile($view); $this->assertEquals($expectedFileName, $fileName); } }