Fix more coding style errors.

This commit is contained in:
mark_story 2012-03-18 18:52:35 -04:00
parent 480c1bbb54
commit e33dc98124
3 changed files with 7 additions and 84 deletions

View file

@ -67,7 +67,6 @@ class L10nTest extends CakeTestCase {
$l10n->get('');
$this->assertEquals($l10n->lang, 'en-us');
// Using $this->default
$l10n = new L10n();
@ -83,7 +82,7 @@ class L10nTest extends CakeTestCase {
* @return void
*/
public function testGetAutoLanguage() {
$__SERVER = $_SERVER;
$serverBackup = $_SERVER;
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'inexistent,en-ca';
$l10n = new L10n();
@ -107,7 +106,7 @@ class L10nTest extends CakeTestCase {
$this->assertEquals($l10n->languagePath, array('eng', 'eng', 'eng'));
$this->assertEquals($l10n->locale, 'eng');
$_SERVER = $__SERVER;
$_SERVER = $serverBackup;
}
/**
@ -895,7 +894,7 @@ class L10nTest extends CakeTestCase {
$result = $l10n->catalog(array('cy'));
$expected = array(
'cy' => array('language' => 'Welsh', 'locale' => 'cym', 'localeFallback' => 'cym', 'charset' => 'utf-8',
'direction' => 'ltr')
'direction' => 'ltr')
);
$this->assertEquals($expected, $result);

View file

@ -159,14 +159,12 @@ class MultibyteTest extends CakeTestCase {
65265, 65266, 65267, 65268, 65269, 65270, 65271, 65272, 65273, 65274, 65275, 65276);
$this->assertEquals($expected, $result);
$string = '';
$result = Multibyte::utf8($string);
$expected = array(65345, 65346, 65347, 65348, 65349, 65350, 65351, 65352, 65353, 65354, 65355, 65356, 65357, 65358, 65359, 65360,
65361, 65362, 65363, 65364, 65365, 65366, 65367, 65368, 65369, 65370);
$this->assertEquals($expected, $result);
$string = '。「」、・ヲァィゥェォャュョッーアイウエオカキク';
$result = Multibyte::utf8($string);
$expected = array(65377, 65378, 65379, 65380, 65381, 65382, 65383, 65384, 65385, 65386, 65387, 65388, 65389, 65390, 65391, 65392,
@ -341,7 +339,6 @@ class MultibyteTest extends CakeTestCase {
11489, 11491);
$this->assertEquals($expected, $result);
$string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ';
$result = Multibyte::utf8($string);
$expected = array(64256, 64257, 64258, 64259, 64260, 64261, 64262, 64275, 64276, 64277, 64278, 64279);
@ -6566,57 +6563,7 @@ class MultibyteTest extends CakeTestCase {
$result = mb_strtolower($string);
$expected = 'ἀι';
$this->assertEquals($expected, $result);
/*
The tests below are flaky across different platforms.
$string = 'ԀԂԄԆԈԊԌԎԐԒ';
$result = mb_strtolower($string);
$expected = 'ԁԃԅԇԉԋԍԏԑԓ';
$this->assertEquals($expected, $result);
$string = 'ԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖև';
$result = mb_strtolower($string);
$expected = 'աբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆև';
$this->assertEquals($expected, $result);
$string = 'ḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẖẗẘẙẚẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸ';
$result = mb_strtolower($string);
$expected = 'ḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹ';
$this->assertEquals($expected, $result);
$string = 'ΩKÅ';
$result = mb_strtolower($string);
$expected = 'ωkå';
$this->assertEquals($expected, $result);
$string = 'ΩKÅ';
$result = mb_strtolower($string);
$expected = 'ωkå';
$this->assertEquals($expected, $result);
/*
mb_strtolower does not work for these strings.
$string = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↃ';
$result = mb_strtolower($string);
$expected = 'ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↄ';
$this->assertEquals($expected, $result);
$string = 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ';
$result = mb_strtolower($string);
$expected = 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ';
$this->assertEquals($expected, $result);
$string = 'ⰀⰁⰂⰃⰄⰅⰆⰇⰈⰉⰊⰋⰌⰍⰎⰏⰐⰑⰒⰓⰔⰕⰖⰗⰘⰙⰚⰛⰜⰝⰞⰟⰠⰡⰢⰣⰤⰥⰦⰧⰨⰩⰪⰫⰬⰭⰮ';
$result = mb_strtolower($string);
$expected = 'ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞ';
$this->assertEquals($expected, $result);
$string = 'ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢ';
$result = mb_strtolower($string);
$expected = 'ⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ';
$this->assertEquals($expected, $result);
*/
$string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ';
$result = mb_strtolower($string);
$expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ';
@ -7696,29 +7643,6 @@ mb_strtolower does not work for these strings.
$expected = 'ΩKÅ';
$this->assertEquals($expected, $result);
/*
mb_strtoupper does not work for these strings.
$string = 'ⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↄ';
$result = mb_strtoupper($string);
$expected = 'ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↃ';
$this->assertEquals($expected, $result);
$string = 'ⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ';
$result = mb_strtoupper($string);
$expected = 'ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏ';
$this->assertEquals($expected, $result);
$string = 'ⰰⰱⰲⰳⰴⰵⰶⰷⰸⰹⰺⰻⰼⰽⰾⰿⱀⱁⱂⱃⱄⱅⱆⱇⱈⱉⱊⱋⱌⱍⱎⱏⱐⱑⱒⱓⱔⱕⱖⱗⱘⱙⱚⱛⱜⱝⱞ';
$result = mb_strtoupper($string);
$expected = 'ⰀⰁⰂⰃⰄⰅⰆⰇⰈⰉⰊⰋⰌⰍⰎⰏⰐⰑⰒⰓⰔⰕⰖⰗⰘⰙⰚⰛⰜⰝⰞⰟⰠⰡⰢⰣⰤⰥⰦⰧⰨⰩⰪⰫⰬⰭⰮ';
$this->assertEquals($expected, $result);
$string = 'ⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣ';
$result = mb_strtoupper($string);
$expected = 'ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢ';
$this->assertEquals($expected, $result);
*/
$string = 'fffiflffifflſtstﬓﬔﬕﬖﬗ';
$result = mb_strtoupper($string);
$expected = 'fffiflffifflſtstﬓﬔﬕﬖﬗ';