public function testCreateFromString() { $time = time(); $entry = rex_log_entry::createFromString(date('Y-m-d H:i:s', $time) . ' | test1 | | test2'); $this->assertInstanceOf('rex_log_entry', $entry); $this->assertSame($time, $entry->getTimestamp()); $this->assertSame(['test1', '', 'test2'], $entry->getData()); }
/** * @return rex_log_entry */ public function current() { return rex_log_entry::createFromString($this->currentLine); }