mirror of
				https://github.com/brmlab/brmsklad.git
				synced 2025-10-31 00:03:58 +01:00 
			
		
		
		
	Upgrade CakePHP from 2.2.5 to 2.9.5
This commit is contained in:
		
							parent
							
								
									5a580df460
								
							
						
					
					
						commit
						235a541597
					
				
					 793 changed files with 60746 additions and 23753 deletions
				
			
		|  | @ -2,20 +2,20 @@ | |||
| /** | ||||
|  * L10nTest file | ||||
|  * | ||||
|  * PHP 5 | ||||
|  * | ||||
|  * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html> | ||||
|  * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | ||||
|  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | ||||
|  * | ||||
|  * Licensed under The MIT License | ||||
|  * For full copyright and license information, please see the LICENSE.txt | ||||
|  * Redistributions of files must retain the above copyright notice | ||||
|  * | ||||
|  * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) | ||||
|  * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | ||||
|  * @link          http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests | ||||
|  * @package       Cake.Test.Case.I18n | ||||
|  * @since         CakePHP(tm) v 1.2.0.5432 | ||||
|  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php) | ||||
|  * @license       http://www.opensource.org/licenses/mit-license.php MIT License | ||||
|  */ | ||||
| 
 | ||||
| App::uses('L10n', 'I18n'); | ||||
| 
 | ||||
| /** | ||||
|  | @ -25,6 +25,16 @@ App::uses('L10n', 'I18n'); | |||
|  */ | ||||
| class L10nTest extends CakeTestCase { | ||||
| 
 | ||||
| /** | ||||
|  * setUp method | ||||
|  * | ||||
|  * @return void | ||||
|  */ | ||||
| 	public function setUp() { | ||||
| 		parent::setUp(); | ||||
| 		Configure::delete('Config.language'); | ||||
| 	} | ||||
| 
 | ||||
| /** | ||||
|  * testGet method | ||||
|  * | ||||
|  | @ -38,14 +48,14 @@ class L10nTest extends CakeTestCase { | |||
| 
 | ||||
| 		$this->assertEquals('en', $lang); | ||||
| 		$this->assertEquals('English', $localize->language); | ||||
| 		$this->assertEquals(array('eng', 'eng'), $localize->languagePath); | ||||
| 		$this->assertEquals(array('eng'), $localize->languagePath); | ||||
| 		$this->assertEquals('eng', $localize->locale); | ||||
| 
 | ||||
| 		// Map Entry
 | ||||
| 		$localize->get('eng'); | ||||
| 
 | ||||
| 		$this->assertEquals('English', $localize->language); | ||||
| 		$this->assertEquals(array('eng', 'eng'), $localize->languagePath); | ||||
| 		$this->assertEquals(array('eng'), $localize->languagePath); | ||||
| 		$this->assertEquals('eng', $localize->locale); | ||||
| 
 | ||||
| 		// Catalog Entry
 | ||||
|  | @ -56,8 +66,7 @@ class L10nTest extends CakeTestCase { | |||
| 		$this->assertEquals('en_ca', $localize->locale); | ||||
| 
 | ||||
| 		// Default Entry
 | ||||
| 		define('DEFAULT_LANGUAGE', 'en-us'); | ||||
| 
 | ||||
| 		$localize->default = 'en-us'; | ||||
| 		$lang = $localize->get('use_default'); | ||||
| 
 | ||||
| 		$this->assertEquals('en-us', $lang); | ||||
|  | @ -68,14 +77,6 @@ class L10nTest extends CakeTestCase { | |||
| 		$localize->get('es'); | ||||
| 		$localize->get(''); | ||||
| 		$this->assertEquals('en-us', $localize->lang); | ||||
| 
 | ||||
| 		// Using $this->default
 | ||||
| 		$localize = new L10n(); | ||||
| 
 | ||||
| 		$localize->get('use_default'); | ||||
| 		$this->assertEquals('English (United States)', $localize->language); | ||||
| 		$this->assertEquals(array('en_us', 'eng', 'eng'), $localize->languagePath); | ||||
| 		$this->assertEquals('en_us', $localize->locale); | ||||
| 	} | ||||
| 
 | ||||
| /** | ||||
|  | @ -92,7 +93,7 @@ class L10nTest extends CakeTestCase { | |||
| 
 | ||||
| 		$this->assertEquals('en-ca', $lang); | ||||
| 		$this->assertEquals('English (Canadian)', $localize->language); | ||||
| 		$this->assertEquals(array('en_ca', 'eng', 'eng'), $localize->languagePath); | ||||
| 		$this->assertEquals(array('en_ca', 'eng'), $localize->languagePath); | ||||
| 		$this->assertEquals('en_ca', $localize->locale); | ||||
| 
 | ||||
| 		$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'es_mx'; | ||||
|  | @ -100,19 +101,52 @@ class L10nTest extends CakeTestCase { | |||
| 
 | ||||
| 		$this->assertEquals('es-mx', $lang); | ||||
| 		$this->assertEquals('Spanish (Mexican)', $localize->language); | ||||
| 		$this->assertEquals(array('es_mx', 'spa', 'eng'), $localize->languagePath); | ||||
| 		$this->assertEquals(array('es_mx', 'spa'), $localize->languagePath); | ||||
| 		$this->assertEquals('es_mx', $localize->locale); | ||||
| 
 | ||||
| 		$localize = new L10n(); | ||||
| 		$localize->default = 'en-us'; | ||||
| 		$lang = $localize->get(); | ||||
| 		$this->assertEquals(array('es_mx', 'spa', 'eng'), $localize->languagePath); | ||||
| 
 | ||||
| 		$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'en_xy,en_ca'; | ||||
| 		$localize->get(); | ||||
| 
 | ||||
| 		$this->assertEquals('English', $localize->language); | ||||
| 		$this->assertEquals(array('eng', 'eng', 'eng'), $localize->languagePath); | ||||
| 		$this->assertEquals(array('eng'), $localize->languagePath); | ||||
| 		$this->assertEquals('eng', $localize->locale); | ||||
| 
 | ||||
| 		$_SERVER = $serverBackup; | ||||
| 	} | ||||
| 
 | ||||
| /** | ||||
|  * testGet method with deprecated constant DEFAULT_LANGUAGE | ||||
|  * | ||||
|  * @return void | ||||
|  */ | ||||
| 	public function testGetWithDeprecatedConstant() { | ||||
| 		$this->skipIf(defined('DEFAULT_LANGUAGE'), 'Cannot re-define already defined constant.'); | ||||
| 
 | ||||
| 		define('DEFAULT_LANGUAGE', 'en-us'); | ||||
| 		$localize = new L10n(); | ||||
| 
 | ||||
| 		$lang = $localize->get('use_default'); | ||||
| 
 | ||||
| 		$this->assertEquals('en-us', $lang); | ||||
| 		$this->assertEquals('English (United States)', $localize->language); | ||||
| 		$this->assertEquals(array('en_us', 'eng'), $localize->languagePath); | ||||
| 		$this->assertEquals('en_us', $localize->locale); | ||||
| 
 | ||||
| 		$localize = new L10n(); | ||||
| 
 | ||||
| 		$lang = $localize->get(); | ||||
| 
 | ||||
| 		$this->assertEquals('en-us', $lang); | ||||
| 		$this->assertEquals('English (United States)', $localize->language); | ||||
| 		$this->assertEquals(array('en_us', 'eng'), $localize->languagePath); | ||||
| 		$this->assertEquals('en_us', $localize->locale); | ||||
| 	} | ||||
| 
 | ||||
| /** | ||||
|  * testMap method | ||||
|  * | ||||
|  | @ -125,8 +159,12 @@ class L10nTest extends CakeTestCase { | |||
| 		$expected = array('afr' => 'af', 'af' => 'afr'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('sqi', 'sq')); | ||||
| 		$expected = array('sqi' => 'sq', 'sq' => 'sqi'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('alb', 'sq')); | ||||
| 		$expected = array('alb' => 'sq', 'sq' => 'alb'); | ||||
| 		$expected = array('alb' => 'sq', 'sq' => 'sqi'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('ara', 'ar')); | ||||
|  | @ -137,12 +175,12 @@ class L10nTest extends CakeTestCase { | |||
| 		$expected = array('hye' => 'hy', 'hy' => 'hye'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('baq', 'eu')); | ||||
| 		$expected = array('baq' => 'eu', 'eu' => 'baq'); | ||||
| 		$result = $localize->map(array('eus', 'eu')); | ||||
| 		$expected = array('eus' => 'eu', 'eu' => 'eus'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('baq', 'eu')); | ||||
| 		$expected = array('baq' => 'eu', 'eu' => 'baq'); | ||||
| 		$expected = array('baq' => 'eu', 'eu' => 'eus'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('bos', 'bs')); | ||||
|  | @ -162,11 +200,11 @@ class L10nTest extends CakeTestCase { | |||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('chi', 'zh')); | ||||
| 		$expected = array('chi' => 'zh', 'zh' => 'chi'); | ||||
| 		$expected = array('chi' => 'zh', 'zh' => 'zho'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('zho', 'zh')); | ||||
| 		$expected = array('zho' => 'zh', 'zh' => 'chi'); | ||||
| 		$expected = array('zho' => 'zh', 'zh' => 'zho'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('hrv', 'hr')); | ||||
|  | @ -174,11 +212,11 @@ class L10nTest extends CakeTestCase { | |||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('ces', 'cs')); | ||||
| 		$expected = array('ces' => 'cs', 'cs' => 'cze'); | ||||
| 		$expected = array('ces' => 'cs', 'cs' => 'ces'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('cze', 'cs')); | ||||
| 		$expected = array('cze' => 'cs', 'cs' => 'cze'); | ||||
| 		$expected = array('cze' => 'cs', 'cs' => 'ces'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('dan', 'da')); | ||||
|  | @ -186,17 +224,21 @@ class L10nTest extends CakeTestCase { | |||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('dut', 'nl')); | ||||
| 		$expected = array('dut' => 'nl', 'nl' => 'dut'); | ||||
| 		$expected = array('dut' => 'nl', 'nl' => 'nld'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('nld', 'nl')); | ||||
| 		$expected = array('nld' => 'nl', 'nl' => 'dut'); | ||||
| 		$expected = array('nld' => 'nl', 'nl' => 'nld'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('nld')); | ||||
| 		$expected = array('nld' => 'nl'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('dut')); | ||||
| 		$expected = array('dut' => 'nl'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('eng', 'en')); | ||||
| 		$expected = array('eng' => 'en', 'en' => 'eng'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
|  | @ -222,11 +264,11 @@ class L10nTest extends CakeTestCase { | |||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('fra', 'fr')); | ||||
| 		$expected = array('fra' => 'fr', 'fr' => 'fre'); | ||||
| 		$expected = array('fra' => 'fr', 'fr' => 'fra'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('fre', 'fr')); | ||||
| 		$expected = array('fre' => 'fr', 'fr' => 'fre'); | ||||
| 		$expected = array('fre' => 'fr', 'fr' => 'fra'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('gla', 'gd')); | ||||
|  | @ -266,11 +308,11 @@ class L10nTest extends CakeTestCase { | |||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('ice', 'is')); | ||||
| 		$expected = array('ice' => 'is', 'is' => 'ice'); | ||||
| 		$expected = array('ice' => 'is', 'is' => 'isl'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('isl', 'is')); | ||||
| 		$expected = array('isl' => 'is', 'is' => 'ice'); | ||||
| 		$expected = array('isl' => 'is', 'is' => 'isl'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('ind', 'id')); | ||||
|  | @ -289,6 +331,10 @@ class L10nTest extends CakeTestCase { | |||
| 		$expected = array('jpn' => 'ja', 'ja' => 'jpn'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('kaz', 'kk')); | ||||
| 		$expected = array('kaz' => 'kk', 'kk' => 'kaz'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('kor', 'ko')); | ||||
| 		$expected = array('kor' => 'ko', 'ko' => 'kor'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
|  | @ -302,19 +348,19 @@ class L10nTest extends CakeTestCase { | |||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('mac', 'mk')); | ||||
| 		$expected = array('mac' => 'mk', 'mk' => 'mac'); | ||||
| 		$expected = array('mac' => 'mk', 'mk' => 'mkd'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('mkd', 'mk')); | ||||
| 		$expected = array('mkd' => 'mk', 'mk' => 'mac'); | ||||
| 		$expected = array('mkd' => 'mk', 'mk' => 'mkd'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('may', 'ms')); | ||||
| 		$expected = array('may' => 'ms', 'ms' => 'may'); | ||||
| 		$expected = array('may' => 'ms', 'ms' => 'msa'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('msa', 'ms')); | ||||
| 		$expected = array('msa' => 'ms', 'ms' => 'may'); | ||||
| 		$expected = array('msa' => 'ms', 'ms' => 'msa'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('mlt', 'mt')); | ||||
|  | @ -346,35 +392,31 @@ class L10nTest extends CakeTestCase { | |||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('ron', 'ro')); | ||||
| 		$expected = array('ron' => 'ro', 'ro' => 'rum'); | ||||
| 		$expected = array('ron' => 'ro', 'ro' => 'ron'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('rum', 'ro')); | ||||
| 		$expected = array('rum' => 'ro', 'ro' => 'rum'); | ||||
| 		$expected = array('rum' => 'ro', 'ro' => 'ron'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('rus', 'ru')); | ||||
| 		$expected = array('rus' => 'ru', 'ru' => 'rus'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('smi', 'sz')); | ||||
| 		$expected = array('smi' => 'sz', 'sz' => 'smi'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('scc', 'sr')); | ||||
| 		$expected = array('scc' => 'sr', 'sr' => 'scc'); | ||||
| 		$result = $localize->map(array('sme', 'se')); | ||||
| 		$expected = array('sme' => 'se', 'se' => 'sme'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('srp', 'sr')); | ||||
| 		$expected = array('srp' => 'sr', 'sr' => 'scc'); | ||||
| 		$expected = array('srp' => 'sr', 'sr' => 'srp'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('slk', 'sk')); | ||||
| 		$expected = array('slk' => 'sk', 'sk' => 'slo'); | ||||
| 		$expected = array('slk' => 'sk', 'sk' => 'slk'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('slo', 'sk')); | ||||
| 		$expected = array('slo' => 'sk', 'sk' => 'slo'); | ||||
| 		$expected = array('slo' => 'sk', 'sk' => 'slk'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->map(array('slv', 'sl')); | ||||
|  | @ -505,7 +547,7 @@ class L10nTest extends CakeTestCase { | |||
| 
 | ||||
| 		$result = $localize->catalog(array('cs')); | ||||
| 		$expected = array( | ||||
| 			'cs' => array('language' => 'Czech', 'locale' => 'cze', 'localeFallback' => 'cze', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'cs' => array('language' => 'Czech', 'locale' => 'ces', 'localeFallback' => 'ces', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
|  | @ -526,10 +568,9 @@ class L10nTest extends CakeTestCase { | |||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('e', 'el')); | ||||
| 		$result = $localize->catalog(array('el')); | ||||
| 		$expected = array( | ||||
| 			'e' => array('language' => 'Greek', 'locale' => 'gre', 'localeFallback' => 'gre', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'el' => array('language' => 'Greek', 'locale' => 'gre', 'localeFallback' => 'gre', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'el' => array('language' => 'Greek', 'locale' => 'ell', 'localeFallback' => 'ell', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
|  | @ -583,13 +624,13 @@ class L10nTest extends CakeTestCase { | |||
| 
 | ||||
| 		$result = $localize->catalog(array('eu')); | ||||
| 		$expected = array( | ||||
| 			'eu' => array('language' => 'Basque', 'locale' => 'baq', 'localeFallback' => 'baq', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'eu' => array('language' => 'Basque', 'locale' => 'eus', 'localeFallback' => 'eus', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('fa')); | ||||
| 		$expected = array( | ||||
| 			'fa' => array('language' => 'Farsi', 'locale' => 'per', 'localeFallback' => 'per', 'charset' => 'utf-8', 'direction' => 'rtl') | ||||
| 			'fa' => array('language' => 'Farsi', 'locale' => 'fas', 'localeFallback' => 'fas', 'charset' => 'utf-8', 'direction' => 'rtl') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
|  | @ -607,12 +648,12 @@ class L10nTest extends CakeTestCase { | |||
| 
 | ||||
| 		$result = $localize->catalog(array('fr', 'fr-be', 'fr-ca', 'fr-ch', 'fr-fr', 'fr-lu')); | ||||
| 		$expected = array( | ||||
| 			'fr' => array('language' => 'French (Standard)', 'locale' => 'fre', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'fr-be' => array('language' => 'French (Belgium)', 'locale' => 'fr_be', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'fr-ca' => array('language' => 'French (Canadian)', 'locale' => 'fr_ca', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'fr-ch' => array('language' => 'French (Swiss)', 'locale' => 'fr_ch', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'fr-fr' => array('language' => 'French (France)', 'locale' => 'fr_fr', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'fr-lu' => array('language' => 'French (Luxembourg)', 'locale' => 'fr_lu', 'localeFallback' => 'fre', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'fr' => array('language' => 'French (Standard)', 'locale' => 'fra', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'fr-be' => array('language' => 'French (Belgium)', 'locale' => 'fr_be', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'fr-ca' => array('language' => 'French (Canadian)', 'locale' => 'fr_ca', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'fr-ch' => array('language' => 'French (Swiss)', 'locale' => 'fr_ch', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'fr-fr' => array('language' => 'French (France)', 'locale' => 'fr_fr', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'fr-lu' => array('language' => 'French (Luxembourg)', 'locale' => 'fr_lu', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
|  | @ -665,16 +706,15 @@ class L10nTest extends CakeTestCase { | |||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('id', 'in')); | ||||
| 		$result = $localize->catalog(array('id')); | ||||
| 		$expected = array( | ||||
| 			'id' => array('language' => 'Indonesian', 'locale' => 'ind', 'localeFallback' => 'ind', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'in' => array('language' => 'Indonesian', 'locale' => 'ind', 'localeFallback' => 'ind', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('is')); | ||||
| 		$expected = array( | ||||
| 			'is' => array('language' => 'Icelandic', 'locale' => 'ice', 'localeFallback' => 'ice', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'is' => array('language' => 'Icelandic', 'locale' => 'isl', 'localeFallback' => 'isl', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
|  | @ -691,6 +731,12 @@ class L10nTest extends CakeTestCase { | |||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('kk')); | ||||
| 		$expected = array( | ||||
| 			'kk' => array('language' => 'Kazakh', 'locale' => 'kaz', 'localeFallback' => 'kaz', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('ko', 'ko-kp', 'ko-kr')); | ||||
| 		$expected = array( | ||||
| 			'ko' => array('language' => 'Korean', 'locale' => 'kor', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr'), | ||||
|  | @ -721,14 +767,14 @@ class L10nTest extends CakeTestCase { | |||
| 
 | ||||
| 		$result = $localize->catalog(array('mk', 'mk-mk')); | ||||
| 		$expected = array( | ||||
| 			'mk' => array('language' => 'FYRO Macedonian', 'locale' => 'mk', 'localeFallback' => 'mac', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'mk-mk' => array('language' => 'Macedonian', 'locale' => 'mk_mk', 'localeFallback' => 'mac', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'mk' => array('language' => 'FYRO Macedonian', 'locale' => 'mkd', 'localeFallback' => 'mkd', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'mk-mk' => array('language' => 'Macedonian', 'locale' => 'mk_mk', 'localeFallback' => 'mkd', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('ms')); | ||||
| 		$expected = array( | ||||
| 			'ms' => array('language' => 'Malaysian', 'locale' => 'may', 'localeFallback' => 'may', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'ms' => array('language' => 'Malaysian', 'locale' => 'msa', 'localeFallback' => 'msa', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
|  | @ -738,24 +784,23 @@ class L10nTest extends CakeTestCase { | |||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('n', 'nl', 'nl-be')); | ||||
| 		$result = $localize->catalog(array('nl', 'nl-be')); | ||||
| 		$expected = array( | ||||
| 			'n' => array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'nl' => array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'nl-be' => array('language' => 'Dutch (Belgium)', 'locale' => 'nl_be', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'nl' => array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'nl-be' => array('language' => 'Dutch (Belgium)', 'locale' => 'nl_be', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog('nl'); | ||||
| 		$expected = array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'); | ||||
| 		$expected = array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog('nld'); | ||||
| 		$expected = array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'); | ||||
| 		$expected = array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog('dut'); | ||||
| 		$expected = array('language' => 'Dutch (Standard)', 'locale' => 'dut', 'localeFallback' => 'dut', 'charset' => 'utf-8', 'direction' => 'ltr'); | ||||
| 		$expected = array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('nb')); | ||||
|  | @ -771,9 +816,8 @@ class L10nTest extends CakeTestCase { | |||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('p', 'pl')); | ||||
| 		$result = $localize->catalog(array('pl')); | ||||
| 		$expected = array( | ||||
| 			'p' => array('language' => 'Polish', 'locale' => 'pol', 'localeFallback' => 'pol', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'pl' => array('language' => 'Polish', 'locale' => 'pol', 'localeFallback' => 'pol', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
|  | @ -793,8 +837,8 @@ class L10nTest extends CakeTestCase { | |||
| 
 | ||||
| 		$result = $localize->catalog(array('ro', 'ro-mo')); | ||||
| 		$expected = array( | ||||
| 			'ro' => array('language' => 'Romanian', 'locale' => 'rum', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'ro-mo' => array('language' => 'Romanian (Moldavia)', 'locale' => 'ro_mo', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'ro' => array('language' => 'Romanian', 'locale' => 'ron', 'localeFallback' => 'ron', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'ro-mo' => array('language' => 'Romanian (Moldavia)', 'locale' => 'ro_mo', 'localeFallback' => 'ron', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
|  | @ -806,7 +850,7 @@ class L10nTest extends CakeTestCase { | |||
| 
 | ||||
| 		$result = $localize->catalog(array('sk')); | ||||
| 		$expected = array( | ||||
| 			'sk' => array('language' => 'Slovak', 'locale' => 'slo', 'localeFallback' => 'slo', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'sk' => array('language' => 'Slovak', 'locale' => 'slk', 'localeFallback' => 'slk', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
|  | @ -818,13 +862,13 @@ class L10nTest extends CakeTestCase { | |||
| 
 | ||||
| 		$result = $localize->catalog(array('sq')); | ||||
| 		$expected = array( | ||||
| 			'sq' => array('language' => 'Albanian', 'locale' => 'alb', 'localeFallback' => 'alb', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'sq' => array('language' => 'Albanian', 'locale' => 'sqi', 'localeFallback' => 'sqi', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('sr')); | ||||
| 		$expected = array( | ||||
| 			'sr' => array('language' => 'Serbian', 'locale' => 'scc', 'localeFallback' => 'scc', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'sr' => array('language' => 'Serbian', 'locale' => 'srp', 'localeFallback' => 'srp', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
|  | @ -835,15 +879,9 @@ class L10nTest extends CakeTestCase { | |||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('sx')); | ||||
| 		$result = $localize->catalog(array('se')); | ||||
| 		$expected = array( | ||||
| 			'sx' => array('language' => 'Sutu', 'locale' => 'sx', 'localeFallback' => 'sx', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('sz')); | ||||
| 		$expected = array( | ||||
| 			'sz' => array('language' => 'Sami (Lappish)', 'locale' => 'smi', 'localeFallback' => 'smi', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'se' => array('language' => 'Sami', 'locale' => 'sme', 'localeFallback' => 'sme', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
|  | @ -916,11 +954,11 @@ class L10nTest extends CakeTestCase { | |||
| 
 | ||||
| 		$result = $localize->catalog(array('zh', 'zh-cn', 'zh-hk', 'zh-sg', 'zh-tw')); | ||||
| 		$expected = array( | ||||
| 			'zh' => array('language' => 'Chinese', 'locale' => 'chi', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'zh-cn' => array('language' => 'Chinese (PRC)', 'locale' => 'zh_cn', 'localeFallback' => 'chi', 'charset' => 'GB2312', 'direction' => 'ltr'), | ||||
| 			'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'zh-sg' => array('language' => 'Chinese (Singapore)', 'locale' => 'zh_sg', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'zh-tw' => array('language' => 'Chinese (Taiwan)', 'locale' => 'zh_tw', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 			'zh' => array('language' => 'Chinese', 'locale' => 'zho', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'zh-cn' => array('language' => 'Chinese (PRC)', 'locale' => 'zh_cn', 'localeFallback' => 'zho', 'charset' => 'GB2312', 'direction' => 'ltr'), | ||||
| 			'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'zh-sg' => array('language' => 'Chinese (Singapore)', 'locale' => 'zh_sg', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'zh-tw' => array('language' => 'Chinese (Taiwan)', 'locale' => 'zh_tw', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
|  | @ -930,13 +968,12 @@ class L10nTest extends CakeTestCase { | |||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
| 
 | ||||
| 		$result = $localize->catalog(array('en-nz', 'es-do', 'sz', 'ar-lb', 'zh-hk', 'pt-br')); | ||||
| 		$result = $localize->catalog(array('en-nz', 'es-do', 'ar-lb', 'zh-hk', 'pt-br')); | ||||
| 		$expected = array( | ||||
| 			'en-nz' => array('language' => 'English (New Zealand)', 'locale' => 'en_nz', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'es-do' => array('language' => 'Spanish (Dominican Republic)', 'locale' => 'es_do', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'sz' => array('language' => 'Sami (Lappish)', 'locale' => 'smi', 'localeFallback' => 'smi', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'ar-lb' => array('language' => 'Arabic (Lebanon)', 'locale' => 'ar_lb', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), | ||||
| 			'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'pt-br' => array('language' => 'Portuguese (Brazil)', 'locale' => 'pt_br', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
| 		$this->assertEquals($expected, $result); | ||||
|  | @ -945,8 +982,8 @@ class L10nTest extends CakeTestCase { | |||
| 		$expected = array( | ||||
| 			'eng' => array('language' => 'English', 'locale' => 'eng', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'deu' => array('language' => 'German (Standard)', 'locale' => 'deu', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'zho' => array('language' => 'Chinese', 'locale' => 'chi', 'localeFallback' => 'chi', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'rum' => array('language' => 'Romanian', 'locale' => 'rum', 'localeFallback' => 'rum', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'zho' => array('language' => 'Chinese', 'locale' => 'zho', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'rum' => array('language' => 'Romanian', 'locale' => 'ron', 'localeFallback' => 'ron', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'zul' => array('language' => 'Zulu', 'locale' => 'zul', 'localeFallback' => 'zul', 'charset' => 'utf-8', 'direction' => 'ltr'), | ||||
| 			'yid' => array('language' => 'Yiddish', 'locale' => 'yid', 'localeFallback' => 'yid', 'charset' => 'utf-8', 'direction' => 'ltr') | ||||
| 		); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Brm Ko
						Brm Ko