예제 #1
0
 /**
  * @test
  */
 public function hasBeginDateWithBeginDateReturnsTrue()
 {
     $this->fixture->setBeginDateAsUnixTimeStamp(42);
     self::assertTrue($this->fixture->hasBeginDate());
 }
예제 #2
0
 /**
  * @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));
 }
예제 #3
0
 /**
  * @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));
 }