protected function onNodeChange($id_node, $node, $old_node) { $this->O->event()->trigger($this->namespace . '.node.change'); $uid = $this->O->auth()->uid(); $label = Filter::text('node.revision.label', $node, 'revision'); $comment = Filter::text('node.revision.comment', $node); $this->addRevision($id_node, $uid, $label, $comment, Date::fromStrtotime(time())->mysqlDateTime(), $old_node); }
/** * @covers Fp\Core\Date::fromStrtotime * @todo Implement testFromStrtotime(). */ public function testFromStrtotime() { $this->assertEquals('25/12/1998', \Fp\Core\Date::fromStrtotime('25 december 1998')->format('d/m/Y')); $this->assertEquals('1400511755', \Fp\Core\Date::fromStrtotime('1400511755')->unixTime()); // not modify unix time }