PATH:
opt
/
alt
/
tests
/
alt-php54-pecl-yaf_2.3.5-1.el8
/
tests
--TEST-- Check for Sample application --SKIPIF-- <?php if (!extension_loaded("yaf")) print "skip"; ?> --INI-- yaf.use_spl_autoload=0 yaf.lowcase_path=0 yaf.use_namespace=0 --FILE-- <?php require "build.inc"; startup(); $config = array( "application" => array( "directory" => APPLICATION_PATH, "dispatcher" => array ( "catchException" => true, ), "library" => array( ), ), ); file_put_contents(APPLICATION_PATH . "/controllers/Error.php", <<<PHP <?php class ErrorController extends Yaf_Controller_Abstract { public function errorAction(\$exception) { var_dump(\$exception->getMessage()); return FALSE; } } PHP ); file_put_contents(APPLICATION_PATH . "/Bootstrap.php", <<<PHP <?php class Bootstrap extends Yaf_Bootstrap_Abstract { public function _initConfig(Yaf_Dispatcher \$dispatcher) { Yaf_Registry::set("config", Yaf_Application::app()->getConfig()); } public function _initPlugin(Yaf_Dispatcher \$dispatcher) { \$dispatcher->registerPlugin(new TestPlugin()); } } PHP ); file_put_contents(APPLICATION_PATH . "/plugins/Test.php", <<<PHP <?php class TestPlugin extends Yaf_Plugin_Abstract { public function routerStartup(Yaf_Request_Abstract \$request, Yaf_Response_Abstract \$response) { var_dump("routerStartup"); } public function routerShutdown(Yaf_Request_Abstract \$request, Yaf_Response_Abstract \$response) { var_dump("routerShutdown"); } public function dispatchLoopStartup(Yaf_Request_Abstract \$request, Yaf_Response_Abstract \$response) { var_dump("dispatchLoopStartup"); } public function preDispatch(Yaf_Request_Abstract \$request, Yaf_Response_Abstract \$response) { var_dump("preDispatch"); } public function postDispatch(Yaf_Request_Abstract \$request, Yaf_Response_Abstract \$response) { var_dump("postDispatch"); } public function dispatchLoopShutdown(Yaf_Request_Abstract \$request, Yaf_Response_Abstract \$response) { global \$value; var_dump("dispatchLoopShutdown, global var is:" . \$value); } } PHP ); $value = NULL; file_put_contents(APPLICATION_PATH . "/controllers/Index.php", <<<PHP <?php class IndexController extends Yaf_Controller_Abstract { public function init() { var_dump("init"); } public function indexAction() { global \$value; var_dump("action"); var_dump(Yaf_Registry::get("config")->application->dispatcher->catchException); \$this->getView()->assignRef("ref", \$value); } } PHP ); file_put_contents(APPLICATION_PATH . "/views/index/index.phtml", "<?php var_dump('view'); \$ref = \"changed\"; ?>"); $app = new Yaf_Application($config); $app->bootstrap()->run(); ?> --CLEAN-- <?php /* unlink foo2.phtml permission denied */ require "build.inc"; shutdown(); ?> --EXPECTF-- string(13) "routerStartup" string(14) "routerShutdown" string(19) "dispatchLoopStartup" string(11) "preDispatch" string(4) "init" string(6) "action" bool(true) string(12) "postDispatch" string(43) "dispatchLoopShutdown, global var is:changed" string(4) "view"
[-] 009.phpt
[edit]
[-] 041.phpt
[edit]
[-] 014.phpt
[edit]
[-] system.ini
[edit]
[-] 054.phpt
[edit]
[-] 072.phpt
[edit]
[-] 005.phpt
[edit]
[-] 033.phpt
[edit]
[-] 069.phpt
[edit]
[-] 019.phpt
[edit]
[-] 025.phpt
[edit]
[-] 062.phpt
[edit]
[-] 065.phpt
[edit]
[-] bug61493.phpt
[edit]
[-] 036.phpt
[edit]
[-] 012.phpt
[edit]
[-] 061.phpt
[edit]
[-] 013.phpt
[edit]
[-] 003.phpt
[edit]
[-] 018.phpt
[edit]
[-] multi-section.ini
[edit]
[-] bug62702.phpt
[edit]
[-] 063.phpt
[edit]
[-] 037.phpt
[edit]
[-] 029.phpt
[edit]
[-] 042.phpt
[edit]
[-] 043.phpt
[edit]
[-] 049.phpt
[edit]
[-] 067.phpt
[edit]
[-] 077.phpt
[edit]
[-] 007.phpt
[edit]
[-] 055.phpt
[edit]
[-] 058.phpt
[edit]
[-] 008.phpt
[edit]
[-] 073.phpt
[edit]
[-] 021.phpt
[edit]
[-] 034.phpt
[edit]
[-] 031.phpt
[edit]
[-] 022.phpt
[edit]
[-] 071.phpt
[edit]
[-] 047.phpt
[edit]
[-] 020.phpt
[edit]
[-] 051.phpt
[edit]
[-] 052.phpt
[edit]
[-] 056.phpt
[edit]
[-] 032.phpt
[edit]
[-] 001.phpt
[edit]
[-] 027.phpt
[edit]
[-] 060.phpt
[edit]
[-] 028.phpt
[edit]
[-] 039.phpt
[edit]
[-] 015.phpt
[edit]
[-] 053.phpt
[edit]
[-] 068.phpt
[edit]
[-] 038.phpt
[edit]
[-] 035.phpt
[edit]
[-] 050.phpt
[edit]
[-] 076.phpt
[edit]
[-] 070.phpt
[edit]
[-] 002.phpt
[edit]
[-] 017.phpt
[edit]
[-] build.inc
[edit]
[-] 006.phpt
[edit]
[-] 057.phpt
[edit]
[-] 066.phpt
[edit]
[-] 023.phpt
[edit]
[-] 004.phpt
[edit]
[-] bug63381.phpt
[edit]
[-] 078.phpt
[edit]
[-] 074.phpt
[edit]
[-] 064.phpt
[edit]
[-] 045.phpt
[edit]
[-] bug63438.phpt
[edit]
[-] 026.phpt
[edit]
[-] 044.phpt
[edit]
[-] 030.phpt
[edit]
[+]
..
[-] 046.phpt
[edit]
[-] 040.phpt
[edit]
[-] simple.ini
[edit]
[-] 048.phpt
[edit]
[-] 010.phpt
[edit]
[-] bug63900.phpt
[edit]
[-] 059.phpt
[edit]
[-] 075.phpt
[edit]
[-] 011.phpt
[edit]
[-] 024.phpt
[edit]