- in the IDE:
- open the core/kernel/db/db_event_handler.php file for editing
- add the below code at the beginning of the \kDBEventHandler::OnUploadFile method:
$log = $this->Application->log('test message (from upload)', 555); $log->addRequestData(); $log->setLogLevel(kLogger::LL_ERROR); $log->write();
- save changes
- open the modules/in-bulletin/units/polls/poll_eh.php file for editing
- add below code at the beginning of the \PollEventHandler::SetCustomQuery method:
$log = $this->Application->log('test message (from grid)', 555); $log->addRequestData(); $log->setLogLevel(kLogger::LL_ERROR); $log->write();
- save changes
- in the Admin Console:
- go to the Website & Content → Polls section
- upload a file
- confirm, that file was uploaded to the server
- go to the Logs & Reports → System Log section
- confirm, that only system log messages, described in the test plan, were added since the test started
- open the test message (grid) message for editing
- confirm, that it contains the following keys in the Request Data array: Headers, _GET, and _COOKIE
- close it
- open the test message (upload) message for editing
- confirm, that it contains the following keys in the Request Data array: Headers, _GET, _POST, _COOKIE, and _FILES
- close it