/** * Locates a view file * * @param string $name * * @return string|null Path to file */ public function findView($name) { if (file_exists($name)) { return $name; } return $this->viewManager->findView($name); }
/** * @covers ::findView */ public function testFindView() { $this->finderMock->shouldReceive('findFileReversed')->with('views/file.php')->andReturn('views/file.php')->once(); $this->assertEquals('views/file.php', $this->viewManager->findView('file.php')); }