forked from laruence/yaf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the templates directory handling
- Loading branch information
Showing
8 changed files
with
129 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--TEST-- | ||
Check for Yaf_View_Simple and application's template directory | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("yaf")) print "skip"; ?> | ||
--INI-- | ||
yaf.library="/php/global/dir" | ||
--FILE-- | ||
<?php | ||
$view = new Yaf_View_Simple(dirname(__FILE__)); | ||
try { | ||
$view = new Yaf_View_Simple(""); | ||
} catch (Yaf_Exception_TypeError $e) { | ||
var_dump($e->getMessage()); | ||
} | ||
|
||
$config = array( | ||
"application" => array( | ||
"directory" => dirname(__FILE__), | ||
), | ||
); | ||
$app = new Yaf_Application($config); | ||
|
||
$view = Yaf_Dispatcher::getInstance()->initView(array()); | ||
var_dump($view->getScriptPath()); | ||
?> | ||
--EXPECTF-- | ||
string(%d) "Expects an absolute path for templates directory" | ||
NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.