<?php
/* SVN FILE: $Id: multibyte.test.php 7296 2008-06-27 09:09:03Z gwoo $ */
/**
* Short description for file.
*
* Long description for file
*
* PHP versions 4 and 5
*
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
* Copyright 2005-2008, Cake Software Foundation, Inc.
* 1785 E. Sahara Avenue, Suite 490-204
* Las Vegas, Nevada 89104
*
* Licensed under The Open Group Test Suite License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc.
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
* @package cake.tests
* @subpackage cake.tests.cases.libs
* @since CakePHP(tm) v 1.2.0.6833
* @version $Revision: 7296 $
* @modifiedby $LastChangedBy: gwoo $
* @lastmodified $Date: 2008-06-27 02:09:03 -0700 (Fri, 27 Jun 2008) $
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/
App::import('Core', 'Multibyte');
/**
* Short description for class.
*
* @package cake.tests
* @subpackage cake.tests.cases.libs
*/
class MultibyteTest extends UnitTestCase {
/**
* testUtf8 method
*
* @access public
* @return void
*/
function testUtf8() {
$string = '!"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~';
$result = Multibyte::utf8($string);
$expected = array(33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126);
$this->assertEqual($result, $expected);
$string = '¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈ';
$result = Multibyte::utf8($string);
$expected = array(161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200);
$this->assertEqual($result, $expected);
$string = 'ÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬ';
$result = Multibyte::utf8($string);
$expected = array(201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300);
$this->assertEqual($result, $expected);
$string = 'ĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſƀƁƂƃƄƅƆƇƈƉƊƋƌƍƎƏƐ';
$result = Multibyte::utf8($string);
$expected = array(301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342,
343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400);
$this->assertEqual($result, $expected);
$string = 'ƑƒƓƔƕƖƗƘƙƚƛƜƝƞƟƠơƢƣƤƥƦƧƨƩƪƫƬƭƮƯưƱƲƳƴƵƶƷƸƹƺƻƼƽƾƿǀǁǂǃDŽDždžLJLjljNJNjnjǍǎǏǐǑǒǓǔǕǖǗǘǙǚǛǜǝǞǟǠǡǢǣǤǥǦǧǨǩǪǫǬǭǮǯǰDZDzdzǴ';
$result = Multibyte::utf8($string);
$expected = array(401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463,
464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484,
485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500);
$this->assertEqual($result, $expected);
$string = 'əɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰʱʲʳʴʵʶʷʸʹʺʻʼ';
$result = Multibyte::utf8($string);
$expected = array(601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621,
622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642,
643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663,
664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684,
685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700);
$this->assertEqual($result, $expected);
$string = 'ЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛ';
$result = Multibyte::utf8($string);
$expected = array(1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041,
1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051);
$this->assertEqual($result, $expected);
$string = 'МНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыь';
$result = Multibyte::utf8($string);
$expected = array(1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069,
1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087,
1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100);
$this->assertEqual($result, $expected);
$string = 'չպջռսվտ';
$result = Multibyte::utf8($string);
$expected = array(1401, 1402, 1403, 1404, 1405, 1406, 1407);
$this->assertEqual($result, $expected);
$string = 'فقكلمنهوىيًٌٍَُ';
$result = Multibyte::utf8($string);
$expected = array(1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 1610, 1611, 1612, 1613, 1614, 1615);
$this->assertEqual($result, $expected);
$string = '✰✱✲✳✴✵✶✷✸✹✺✻✼✽✾✿❀❁❂❃❄❅❆❇❈❉❊❋❌❍❎❏❐❑❒❓❔❕❖❗❘❙❚❛❜❝❞';
$result = Multibyte::utf8($string);
$expected = array(10032, 10033, 10034, 10035, 10036, 10037, 10038, 10039, 10040, 10041, 10042, 10043, 10044,
10045, 10046, 10047, 10048, 10049, 10050, 10051, 10052, 10053, 10054, 10055, 10056, 10057,
10058, 10059, 10060, 10061, 10062, 10063, 10064, 10065, 10066, 10067, 10068, 10069, 10070,
10071, 10072, 10073, 10074, 10075, 10076, 10077, 10078);
$this->assertEqual($result, $expected);
$string = '⺀⺁⺂⺃⺄⺅⺆⺇⺈⺉⺊⺋⺌⺍⺎⺏⺐⺑⺒⺓⺔⺕⺖⺗⺘⺙⺛⺜⺝⺞⺟⺠⺡⺢⺣⺤⺥⺦⺧⺨⺩⺪⺫⺬⺭⺮⺯⺰⺱⺲⺳⺴⺵⺶⺷⺸⺹⺺⺻⺼⺽⺾⺿⻀⻁⻂⻃⻄⻅⻆⻇⻈⻉⻊⻋⻌⻍⻎⻏⻐⻑⻒⻓⻔⻕⻖⻗⻘⻙⻚⻛⻜⻝⻞⻟⻠';
$result = Multibyte::utf8($string);
$expected = arra
没有合适的资源?快使用搜索试试~ 我知道了~
一个基于cakephp的相册管理系统
共703个文件
php:412个
ctp:109个
empty:71个
4星 · 超过85%的资源 需积分: 9 279 下载量 91 浏览量
2008-09-02
11:55:27
上传
评论
收藏 1.16MB RAR 举报
温馨提示
一个基于cakephp的相册管理系统,在网上找到的,和大家分享 我的新博客http://www.cakesns.cn
资源推荐
资源详情
资源评论
收起资源包目录
一个基于cakephp的相册管理系统 (703个子文件)
cake.bat 1KB
cake 1KB
style.css 11KB
cake.generic.css 8KB
cake.generic.css 7KB
lightbox.css 597B
test_plugin_asset.css 38B
test_asset.css 31B
view.ctp 9KB
view.ctp 7KB
view.ctp 6KB
test_nocache_tags.ctp 6KB
home.ctp 6KB
comments.ctp 4KB
admin_index.ctp 4KB
index.ctp 4KB
index.ctp 4KB
admin_index.ctp 4KB
default.ctp 3KB
browse.ctp 3KB
form.ctp 3KB
admin_manager_gui.ctp 3KB
admin_edit.ctp 3KB
admin_index.ctp 2KB
index.ctp 2KB
home.ctp 2KB
admin_index.ctp 2KB
edit.ctp 2KB
default.ctp 2KB
admin_index.ctp 2KB
admin_add.ctp 2KB
home.ctp 2KB
default.ctp 2KB
default.ctp 2KB
missing_action.ctp 2KB
comment_notification.ctp 2KB
admin_edit.ctp 2KB
missing_component_class.ctp 2KB
missing_controller.ctp 2KB
missing_helper_file.ctp 2KB
missing_model.ctp 2KB
missing_helper_class.ctp 2KB
missing_component_file.ctp 2KB
flash.ctp 2KB
flash.ctp 2KB
flash.ctp 2KB
missing_view.ctp 2KB
missing_layout.ctp 1KB
missing_connection.ctp 1KB
missing_scaffolddb.ctp 1KB
calendar.ctp 1KB
add.ctp 1KB
index.ctp 1KB
private_action.ctp 1KB
missing_table.ctp 1KB
scaffold_error.ctp 1KB
rating.ctp 1KB
database_details.ctp 1KB
default.ctp 1KB
default.ctp 1KB
admin_details.ctp 1KB
error404.ctp 1KB
index.ctp 1KB
dump.ctp 1KB
default.ctp 1KB
default.ctp 1KB
default.ctp 1KB
default.ctp 1KB
fullsize.ctp 1KB
admin_edit.ctp 1KB
login.ctp 996B
default.ctp 968B
default.ctp 968B
ajax.ctp 954B
ajax.ctp 954B
ajax.ctp 950B
admin_manager_gui.ctp 937B
admin_manager_gui.ctp 927B
browse.ctp 803B
file_system.ctp 735B
edit_tag.ctp 693B
taglist.ctp 691B
browse_menu.ctp 642B
admin_menu.ctp 556B
missing_connection.ctp 473B
success.ctp 462B
admin_manager_gui.ctp 454B
about.ctp 353B
db_error.ctp 351B
relatedtags.ctp 264B
gd_error.ctp 258B
default.ctp 238B
default.ctp 238B
default.ctp 238B
vote.ctp 199B
session_helper.ctp 142B
email.ctp 129B
admin_manager_gui.ctp 121B
default.ctp 109B
default.ctp 109B
共 703 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8
ylcz
- 粉丝: 12
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页