PATH:
opt
/
alt
/
tests
/
alt-php85-pecl-yaf_3.3.7-1.el8
/
tests
--TEST-- Check for Yaf_Dispatcher::dispatch() of errors while loading executor --SKIPIF-- <?php if (!extension_loaded("yaf")) print "skip"; ?> --INI-- yaf.use_namespace=0 yaf.use_spl_autoload=0 --FILE-- <?php require "build.inc"; startup(); $config = array( "application" => array( "directory" => APPLICATION_PATH, ), ); $app = new Yaf_Application($config); $dispatcher = $app->getDispatcher(); $request = new Yaf_Request_Simple(); set_error_handler(function ($no, $msg) { var_dump(substr($msg, 0, 100)); }); $request->setControllerName(str_repeat("Index", 1024 * 1024)); try { $dispatcher->dispatch($request); } catch (Exception $e) { var_dump(substr($e->getMessage(), 0, 100)); } $request->setControllerName("index"); try { $dispatcher->dispatch($request); } catch (Exception $e) { var_dump($e->getMessage()); } file_put_contents(APPLICATION_PATH . "/controllers/Index.php", "xxx"); try { $dispatcher->dispatch($request); } catch (Exception $e) { var_dump($e->getMessage()); } file_put_contents(APPLICATION_PATH . "/controllers/Index.php", <<<PHP <?php class IndexController { public function indexAction() { } } PHP ); try { $dispatcher->dispatch($request); } catch (Exception $e) { var_dump($e->getMessage()); } $request->setControllerName("dummy"); file_put_contents(APPLICATION_PATH . "/controllers/Dummy.php", <<<PHP <?php class DummyController extends Yaf_Controller_Abstract { } PHP ); try { $dispatcher->dispatch($request); } catch (Exception $e) { var_dump($e->getMessage()); } $request->setControllerName("dummy1"); file_put_contents(APPLICATION_PATH . "/controllers/Dummy1.php", <<<PHP <?php class Dummy1Controller extends Yaf_Controller_Abstract { public \$actions; } PHP ); try { $dispatcher->dispatch($request); } catch (Exception $e) { var_dump($e->getMessage()); } $request->setControllerName("dummy2"); file_put_contents(APPLICATION_PATH . "/controllers/Dummy2.php", <<<PHP <?php class Dummy2Controller extends Yaf_Controller_Abstract { public \$actions = array(); } PHP ); try { $dispatcher->dispatch($request); } catch (Exception $e) { var_dump($e->getMessage()); } $request->setControllerName("dummy3"); file_put_contents(APPLICATION_PATH . "/controllers/Dummy3.php", <<<PHP <?php class Dummy3Controller extends Yaf_Controller_Abstract { public \$actions = array("index" => NULL); } PHP ); try { $dispatcher->dispatch($request); } catch (Exception $e) { var_dump($e->getMessage()); } $request->setControllerName("dummy4"); file_put_contents(APPLICATION_PATH . "/controllers/Dummy4.php", <<<PHP <?php class Dummy4Controller extends Yaf_Controller_Abstract { public \$actions = array( "index" => "actions/index.php", "foo" => "actions/foo.php", ); } PHP ); try { $dispatcher->dispatch($request); } catch (Exception $e) { var_dump($e->getMessage()); } file_put_contents(APPLICATION_PATH . "/actions/index.php", <<<PHP <?php class IndexAction { } PHP ); try { $dispatcher->dispatch($request); } catch (Exception $e) { var_dump($e->getMessage()); } try { $dispatcher->dispatch($request); } catch (Exception $e) { var_dump($e->getMessage()); } $request->setActionName("foo"); file_put_contents(APPLICATION_PATH . "/actions/foo.php", <<<PHP <?php class FooAction extends Yaf_Action_Abstract { } PHP ); $dispatcher->dispatch($request); ?> --CLEAN-- <?php require "build.inc"; shutdown(); ?> --EXPECTF-- string(100) "path too long while loading 'Indexindexindexindexindexindexindexindexindexindexindexindexindexindexi" string(%d) "Failed opening controller script %sIndex.php: No such file or directory" xxxstring(%d) "Could not find class IndexController in controller script %sIndex.php" string(73) "Controller 'IndexController' is not a subclass of Yaf_Controller_Abstract" string(49) "There is no method indexAction in DummyController" string(50) "There is no method indexAction in Dummy1Controller" string(60) "There is no method indexAction in Dummy2Controller::$actions" string(70) "Action 'index' in Dummy3Controller::actions does not have a valid path" string(%s) "Failed opening action script %sindex.php: No such file or directory" string(61) "Action 'IndexAction' is not a subclass of Yaf_Action_Abstract" string(61) "Action 'IndexAction' is not a subclass of Yaf_Action_Abstract" Fatal error: Class FooAction contains 1 abstract method and must therefore be declared abstract or implement the remaining method%s(Yaf_Action_Abstract::execute) in %sfoo.php on line %d
[-] bug61493.phpt
[edit]
[-] 080.phpt
[edit]
[-] 003.phpt
[edit]
[-] 079.phpt
[edit]
[-] issue297.phpt
[edit]
[-] 032.phpt
[edit]
[-] issue468.phpt
[edit]
[-] issue134.phpt
[edit]
[-] issue231.phpt
[edit]
[-] 108.phpt
[edit]
[-] 110.phpt
[edit]
[-] issue469.phpt
[edit]
[-] 042.phpt
[edit]
[-] bug70913.phpt
[edit]
[-] 001.phpt
[edit]
[-] 071.phpt
[edit]
[-] 059.phpt
[edit]
[-] issue311.phpt
[edit]
[-] 087.phpt
[edit]
[-] 006.phpt
[edit]
[-] 017.phpt
[edit]
[-] 105.phpt
[edit]
[-] 073.phpt
[edit]
[-] 099.phpt
[edit]
[-] 050.phpt
[edit]
[-] 109.phpt
[edit]
[-] 054.phpt
[edit]
[-] 045.phpt
[edit]
[-] 103.phpt
[edit]
[-] 069.phpt
[edit]
[-] 096.phpt
[edit]
[-] 049.phpt
[edit]
[-] 083.phpt
[edit]
[-] 038.phpt
[edit]
[-] 098.phpt
[edit]
[-] 107.phpt
[edit]
[-] 029.phpt
[edit]
[-] 075.phpt
[edit]
[-] 062.phpt
[edit]
[-] 007.phpt
[edit]
[-] 077.phpt
[edit]
[-] 106.phpt
[edit]
[-] 089.phpt
[edit]
[-] 014.phpt
[edit]
[-] 068.phpt
[edit]
[-] issue513.phpt
[edit]
[-] 012.phpt
[edit]
[-] 041.phpt
[edit]
[-] 010.phpt
[edit]
[-] 013.phpt
[edit]
[-] 030.phpt
[edit]
[-] 025.phpt
[edit]
[-] 088.phpt
[edit]
[-] issue535.phpt
[edit]
[-] 091.phpt
[edit]
[-] 035.phpt
[edit]
[-] issue163.phpt
[edit]
[-] bug63900.phpt
[edit]
[-] 086.phpt
[edit]
[-] 053.phpt
[edit]
[-] 004.phpt
[edit]
[-] 047.phpt
[edit]
[-] 018.phpt
[edit]
[-] 026.phpt
[edit]
[-] 097.phpt
[edit]
[-] 065.phpt
[edit]
[-] 027.phpt
[edit]
[-] 019.phpt
[edit]
[-] 020.phpt
[edit]
[-] 078.phpt
[edit]
[-] bug63381.phpt
[edit]
[-] 074.phpt
[edit]
[-] bug76217.phpt
[edit]
[+]
..
[-] 036.phpt
[edit]
[-] 055.phpt
[edit]
[-] bug63438.phpt
[edit]
[-] 002.phpt
[edit]
[-] build.inc
[edit]
[-] 084.phpt
[edit]
[-] 040.phpt
[edit]
[-] 081.phpt
[edit]
[-] 085.phpt
[edit]
[-] 009.phpt
[edit]
[-] 104.phpt
[edit]
[-] 094.phpt
[edit]
[-] issue530.phpt
[edit]
[-] 051.phpt
[edit]
[-] issue415.phpt
[edit]
[-] 037.phpt
[edit]
[-] multi-section.ini
[edit]
[-] 043.phpt
[edit]
[-] 031.phpt
[edit]
[-] 101.phpt
[edit]
[-] 005.phpt
[edit]
[-] 058.phpt
[edit]
[-] 066.phpt
[edit]
[-] issue420.phpt
[edit]
[-] 008.phpt
[edit]
[-] issue518.phpt
[edit]
[-] 102.phpt
[edit]
[-] 028.phpt
[edit]
[-] 011.phpt
[edit]
[-] 052.phpt
[edit]
[-] system.ini
[edit]
[-] 039.phpt
[edit]
[-] 044.phpt
[edit]
[-] 092.phpt
[edit]
[-] 057.phpt
[edit]
[-] bug62702.phpt
[edit]
[-] 064.phpt
[edit]
[-] 070.phpt
[edit]
[-] 061.phpt
[edit]
[-] 056.phpt
[edit]
[-] 090.phpt
[edit]
[-] 015.phpt
[edit]
[-] 046.phpt
[edit]
[-] 072.phpt
[edit]
[-] 063.phpt
[edit]
[-] issue303.phpt
[edit]
[-] 082.phpt
[edit]
[-] 022.phpt
[edit]
[-] 016.phpt
[edit]
[-] 033.phpt
[edit]
[-] 093.phpt
[edit]
[-] simple.ini
[edit]
[-] bug76213.phpt
[edit]
[-] issue232.phpt
[edit]
[-] 060.phpt
[edit]
[-] 021.phpt
[edit]
[-] 076.phpt
[edit]
[-] 023.phpt
[edit]
[-] 095.phpt
[edit]
[-] 100.phpt
[edit]
[-] 048.phpt
[edit]
[-] 067.phpt
[edit]
[-] 024.phpt
[edit]
[-] 034.phpt
[edit]