Preparations
- enable System Log in /system/config.php
- make sure In-Link module is installed
- make sure only In-Portal and Custom modules are enabled (in Configuration → Website → Modules section, when logged-in as root user)
Part 1
- in IDE:
- add trigger_error('test admin', E_USER_WARNING); before $application->Run(); line in /admin/index.php file
- add trigger_error('test front-end', E_USER_WARNING); before $application->Run(); line in /index.php file
- create /vendor/behat/mink/error_test.php file with <?php trigger_error('test vendor', E_USER_WARNING); content
- create /../error_test.php (in parent folder of In-Portal root folder) file with <?php trigger_error('test outside', E_USER_WARNING); content
- create /modules/custom/error_test.php file with <?php trigger_error('test module', E_USER_WARNING); content
- create /modules/in-link/error_test.php file with <?php trigger_error('test disabled module', E_USER_WARNING); content
- create '/modules/unknown-module' folder
- create /modules/unknown-module/error_test.php file with <?php trigger_error('test unknown module', E_USER_WARNING); content
- create /error_test_vendor.php file as copy from /index.php file, that will have all code, that comes after $application->Init(); replaced with require FULL_PATH . '/vendor/behat/mink/error_test.php';
- create /error_test_outside.php file as copy from /index.php file, that will have all code, that comes after $application->Init(); replaced with require FULL_PATH . '/../error_test.php';
- create /error_test_module.php file as copy from /index.php file, that will have all code, that comes after $application->Init(); replaced with require MODULES_PATH . '/custom/error_test.php';
- create /error_test_disabled_module.php file as copy from /index.php file, that will have all code, that comes after $application->Init(); replaced with require MODULES_PATH . '/in-link/error_test.php';
- create /error_test_unknown_module.php file as copy from /index.php file, that will have all code, that comes after $application->Init(); replaced with require MODULES_PATH . '/unknown-module/error_test.php';
- in Web Browser:
- open /admin/index.php url
- confirm, that test admin error was logged into System Log (always) and Debugger (if enabled)
- open /index.php url
- confirm, that test front-end error was logged into System Log (always) and Debugger (if enabled)
- open /error_test_vendor.php url
- confirm, that nothing was logged in System Log and Debugger
- open /error_test_outside.php url
- confirm, that nothing was logged in System Log and Debugger
- open /error_test_unknown_module.php url
- confirm, that nothing was logged in System Log and Debugger
- open /error_test_disabled_module.php url
- confirm, that nothing was logged in System Log and Debugger
- open /error_test_module.php url
- confirm, that test module error was logged into System Log (always) and Debugger (if enabled)
Part 2
- in IDE:
- in all created PHP files replace trigger_error(..., E_USER_WARNING) function call with throw new Exception(...);
- in Web Browser:
- open /admin/index.php url
- confirm, that test admin exception was logged into System Log (always) and Debugger (if enabled)
- open /index.php url
- confirm, that test front-end exception was logged into System Log (always) and Debugger (if enabled)
- open /error_test_vendor.php url
- confirm, that test vendor exception was logged into System Log (always) and Debugger (if enabled)
- open /error_test_outside.php url
- confirm, that test outside exception was logged into System Log (always) and Debugger (if enabled)
- open /error_test_unknown_module.php url
- confirm, that test unknown module exception was logged into System Log (always) and Debugger (if enabled)
- open /error_test_disabled_module.php url
- confirm, that test disabled module exception was logged into System Log (always) and Debugger (if enabled)
- open /error_test_module.php url
- confirm, that test module exception was logged into System Log (always) and Debugger (if enabled)
Part 3
- in IDE:
- in all created PHP files replace throw new Exception(...) function call with trigger_error(..., E_USER_ERROR);
- in Web Browser:
- open /admin/index.php url
- confirm, that test admin fatal error was logged into System Log (always) and Debugger (if enabled)
- open /index.php url
- confirm, that test front-end fatal error was logged into System Log (always) and Debugger (if enabled)
- open /error_test_vendor.php url
- confirm, that test vendor fatal error was logged into System Log (always) and Debugger (if enabled)
- open /error_test_outside.php url
- confirm, that test outside fatal error was logged into System Log (always) and Debugger (if enabled)
- open /error_test_unknown_module.php url
- confirm, that test unknown module fatal error was logged into System Log (always) and Debugger (if enabled)
- open /error_test_disabled_module.php url
- confirm, that test disabled module fatal error was logged into System Log (always) and Debugger (if enabled)
- open /error_test_module.php url
- confirm, that test module fatal error was logged into System Log (always) and Debugger (if enabled)