/** * test looseBehaviour */ public function testLoose() { $date = new Date(0, 'de_DE'); try { $date->set(null, Date::YEAR); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } $date->set(10, 'de_DE'); $this->assertEquals(10, $date->getTimestamp()); try { $date->add(null, Date::YEAR); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } $date->add(10, 'de_DE'); $this->assertEquals(20, $date->getTimestamp()); try { $date->sub(null, Date::YEAR); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } $date->sub(10, 'de_DE'); $this->assertEquals(10, $date->getTimestamp()); try { $date->compare(null, Date::YEAR); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->equals(null, Date::YEAR); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->isEarlier(null, Date::YEAR); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->isLater(null, Date::YEAR); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setTime(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addTime(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subTime(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareTime(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setDate(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addDate(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subDate(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareDate(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setIso(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addIso(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subIso(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareIso(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setArpa(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addArpa(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subArpa(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareArpa(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setYear(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addYear(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subYear(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareYear(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setMonth(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addMonth(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subMonth(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareMonth(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setDay(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addDay(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subDay(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareDay(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setWeekday(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addWeekday(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subWeekday(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareWeekday(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setDayOfYear(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addDayOfYear(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subDayOfYear(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareDayOfYear(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setHour(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addHour(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subHour(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareHour(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setMinute(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addMinute(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subMinute(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareMinute(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setSecond(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addSecond(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subSecond(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareSecond(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->setWeek(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->addWeek(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->subWeek(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } try { $date->compareWeek(null); $this->fail(); } catch (\Zend\Date\Exception $e) { // success } }