Example #1
0
 /**
  * @test
  */
 public function viewHelperRendersElseChildIfConditionIsFalse()
 {
     $this->viewHelper->expects($this->at(0))->method('renderElseChild')->will($this->returnValue('foo'));
     $actualResult = $this->viewHelper->render(FALSE);
     $this->assertEquals('foo', $actualResult);
 }
 /**
  * Render the view helper
  *
  * @param string|\DateTime $base
  * @param string|\DateTime $check
  *
  * @return string
  */
 public function render($base, $check)
 {
     $base = DateTimeUtility::normalizeDateTimeSingle($base);
     $check = DateTimeUtility::normalizeDateTimeSingle($check);
     return parent::render($base > $check);
 }