/** * @test */ public function hasEndDateWithEndDateReturnsTrue() { $this->fixture->setEndDateAsUnixTimeStamp(42); self::assertTrue($this->fixture->hasEndDate()); }
/** * @test */ public function renderWithTimeSpanWithBeginAndEndDateReturnsTimePortionsOfBeginDateAndEndDateSeparatedBySpecifiedDash() { $dash = '#DASH#'; $timeSpan = new tx_seminars_tests_fixtures_TestingTimeSpan(); $timeSpan->setBeginDateAsUnixTimeStamp(self::BEGIN_DATE + tx_oelib_Time::SECONDS_PER_HOUR); $timeSpan->setEndDateAsUnixTimeStamp(self::BEGIN_DATE + 2 * tx_oelib_Time::SECONDS_PER_HOUR); self::assertSame(strftime(self::TIME_FORMAT, self::BEGIN_DATE + tx_oelib_Time::SECONDS_PER_HOUR) . $dash . strftime(self::TIME_FORMAT, self::BEGIN_DATE + 2 * tx_oelib_Time::SECONDS_PER_HOUR) . $this->translatedHours, $this->subject->render($timeSpan, $dash)); }
/** * @test */ public function renderWithTimeSpanWithBeginAndEndDateOnDifferentDaysWithAbbreviateDateRangeFalseReturnsBothFullDatesSeparatedBySpecifiedDash() { $this->configuration->setAsBoolean('abbreviateDateRanges', FALSE); $dash = '#DASH#'; $timeSpan = new tx_seminars_tests_fixtures_TestingTimeSpan(); $timeSpan->setBeginDateAsUnixTimeStamp(self::BEGIN_DATE); $endDate = self::BEGIN_DATE + 2 * 86400; $timeSpan->setEndDateAsUnixTimeStamp($endDate); self::assertEquals(strftime(self::DATE_FORMAT_YMD, self::BEGIN_DATE) . $dash . strftime(self::DATE_FORMAT_YMD, $endDate), $this->fixture->render($timeSpan, $dash)); }