mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Merge pull request #9063 from cakephp/issue-8968
Add test showing that niceShort translates month names.
This commit is contained in:
commit
6bccfe9f40
2 changed files with 14 additions and 0 deletions
|
@ -30,6 +30,7 @@ before_script:
|
|||
- sh -c "composer global require 'phpunit/phpunit=3.7.33'"
|
||||
- sh -c "ln -s ~/.composer/vendor/phpunit/phpunit/PHPUnit ./vendors/PHPUnit"
|
||||
- sudo locale-gen de_DE
|
||||
- sudo locale-gen es_ES
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test2;'; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test3;'; fi"
|
||||
|
|
|
@ -454,6 +454,19 @@ class CakeTimeTest extends CakeTestCase {
|
|||
$this->_restoreSystemTimezone();
|
||||
}
|
||||
|
||||
/**
|
||||
* testNiceShort translations
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testNiceShortI18n() {
|
||||
$restore = setlocale(LC_ALL, 0);
|
||||
setlocale(LC_ALL, 'es_ES');
|
||||
$time = strtotime('2015-01-07 03:05:00');
|
||||
$this->assertEquals('ene 7th 2015, 03:05', $this->Time->niceShort($time));
|
||||
setlocale(LC_ALL, $restore);
|
||||
}
|
||||
|
||||
/**
|
||||
* testDaysAsSql method
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue