public function testExists() { $view = new View(); $view->setBasePath(__DIR__ . '/../'); $view->setViewsDir('unit-tests/views/'); $this->assertTrue($view->exists('test2/index')); $this->assertTrue($view->exists('test3/other')); $this->assertFalse($view->exists('does_not_exist')); }
/** * Tests View::exists * * @author Kamil Skowron <*****@*****.**> * @since 2014-05-28 */ public function testExists() { $this->specify('The View component does don detect views correctly', function () { $view = new View(); $view->setViewsDir(PATH_DATA . 'views' . DIRECTORY_SEPARATOR); expect($view->exists('test2/index'))->true(); expect($view->exists('test3/other'))->true(); expect($view->exists('does_not_exist'))->false(); }); }