/** * Testing the populate_from_string method. * * @since 1.0 */ public function testPopulateFromString() { $this->timestamp1->populateFromString('2007-08-13 23:44:07'); $this->assertEquals('2007-08-13 23:44:07', $this->timestamp1->getValue(), 'testing the populateFromString method'); }
/** * Setter for the unit end time (value will be stored in the session as key unitEndTime). * * @param int $year * @param int $month * @param int $day * @param int $hour * @param int $minute * @param int $second * * @since 1.0 */ public function setUnitEndTime($year, $month, $day, $hour, $minute, $second) { self::$logger->debug('>>setUnitEndTime(year=[' . $year . '], month=[' . $month . '], day=[' . $day . '], hour=[' . $hour . '], minute=[' . $minute . '], second=[' . $second . '])'); $config = ConfigProvider::getInstance(); $sessionProvider = $config->get('session.provider.name'); $session = SessionProviderFactory::getInstance($sessionProvider); $this->unitEndTime->setTimestampValue($year, $month, $day, $hour, $minute, $second); $session->set('unitEndTime', $this->unitEndTime->getValue()); self::$logger->debug('<<setUnitEndTime'); }