/** * Testing toString * * @param string $format How should the time be formatted? * @param string $expectedTime What should the resulting time string look like? * * @return void * * @dataProvider seedTestToString * @since 1.0 * @covers Joomla\Date\Date::__toString */ public function testToString($format, $expectedTime) { if (!is_null($format)) { Date::$format = $format; } $this->assertThat($this->instance->__toString(), $this->equalTo($expectedTime)); }
public function setLastVisit($id) { if ($id) { $date = new Date(); $this->store(array('id' => $id, 'lastvisitDate' => $date->__toString())); } }
public function setLastVisit($id = null) { $table = $this->getTable(); if (!$id) { $id = $this->id; } if ($id) { $date = new Date(); $table->store(array('id' => $id, 'lastvisitDate' => $date->__toString())); } return false; }