/** * This method is called before a test is executed. */ protected function setUp() { $settings = \Phramework\SystemLog\APP\Bootstrap::getSettings(); $this->phramework = \Phramework\SystemLog\APP\Bootstrap::prepare(); $settings['system-log']->log = 'Phramework\\SystemLog\\Log\\DatabaseLog'; $this->systemLog = new SystemLog($settings['system-log']); }
/** * This method is called before a test is executed. */ protected function setUp() { //Prepare phramework instance $this->phramework = Bootstrap::prepare(); $settings = Bootstrap::getSettings(); //Create SystemLog object $this->systemLog = new SystemLog($settings['system-log']); \Phramework\SystemLog\APP\Log\PHPUnit::setDisplayOutput(true); }
<?php use Phramework\SystemLog\SystemLog; include __DIR__ . '/../../vendor/autoload.php'; $settings = \Phramework\SystemLog\APP\Bootstrap::getSettings(); $phramework = \Phramework\SystemLog\APP\Bootstrap::prepare(true); //$settings['system-log']->log = 'Phramework\\SystemLog\\Log\\TerminalLog'; //$settings['system-log']->log = 'Phramework\\SystemLog\\Log\\DatabaseLog'; $systemLog = new SystemLog($settings['system-log']); $systemLog->register((object) ['runtime' => 'php server']); $phramework->invoke();