From d816ea6e1603f10c7878c4bb2af74daf4c9a78eb Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 30 Jun 2016 23:08:43 -0400 Subject: [PATCH] Add test showing that niceShort translates month names. Refs #8968 --- lib/Cake/Test/Case/Utility/CakeTimeTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/Cake/Test/Case/Utility/CakeTimeTest.php b/lib/Cake/Test/Case/Utility/CakeTimeTest.php index 2620f7897..f5741272f 100644 --- a/lib/Cake/Test/Case/Utility/CakeTimeTest.php +++ b/lib/Cake/Test/Case/Utility/CakeTimeTest.php @@ -454,6 +454,17 @@ class CakeTimeTest extends CakeTestCase { $this->_restoreSystemTimezone(); } +/** + * testNiceShort translations + * + * @return void + */ + public function testNiceShortI18n() { + setlocale(LC_ALL, 'es_ES'); + $time = strtotime('2015-01-07 03:05:00'); + $this->assertEquals('ene 7th 2015, 03:05', $this->Time->niceShort($time)); + } + /** * testDaysAsSql method *