public function test_LogEntry_create()
 {
     $count = count(LogEntries());
     $this->assertNotFalse(LogEntry_create('test', 'test_LogEntry_create'));
     // There should be one more log entry now
     $this->assertEquals(count(LogEntries()), $count + 1);
 }
Exemple #2
0
/**
 * Write a log entry.
 * This should be used to log user's activity.
 *
 * @param
 *          $message
 */
function engelsystem_log($message)
{
    global $user;
    if (isset($user)) {
        $nick = User_Nick_render($user);
    } else {
        $nick = "Guest";
    }
    LogEntry_create($nick, $message);
}