[BUGFIX] Correctly treat relative date specification in date-VH
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Tests / Unit / ViewHelpers / Format / DateViewHelperTest.php
index 74a6c4f..7fa95cb 100644 (file)
@@ -145,6 +145,15 @@ class DateViewHelperTest extends UnitTestCase {
                $this->assertEquals('1980-12-12', $actualResult);
        }
 
+       /**
+        * @test
+        */
+       public function relativeDateCalculationWorksWithoutBase() {
+               $this->subject->expects($this->never())->method('renderChildren');
+               $actualResult = $this->subject->render('now', 'Y');
+               $this->assertEquals(date('Y'), $actualResult);
+       }
+
        /**
         * @test
         */