From 71e647782764184e3aab4faffe6d99176758979f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 22 Mar 2018 16:48:55 +0200 Subject: [ci skip] 3.1.8 release --- .travis.yml | 57 - DCO.txt | 25 - build-release.sh | 99 - phpdoc.dist.xml | 21 - tests/Bootstrap.php | 76 - tests/README.md | 226 - tests/codeigniter/Setup_test.php | 13 - tests/codeigniter/core/Benchmark_test.php | 67 - tests/codeigniter/core/Common_test.php | 69 - tests/codeigniter/core/Config_test.php | 240 - tests/codeigniter/core/Input_test.php | 281 - tests/codeigniter/core/Lang_test.php | 101 - tests/codeigniter/core/Loader_test.php | 583 -- tests/codeigniter/core/Log_test.php | 63 - tests/codeigniter/core/Model_test.php | 37 - tests/codeigniter/core/Output_test.php | 63 - tests/codeigniter/core/Security_test.php | 353 - tests/codeigniter/core/URI_test.php | 254 - tests/codeigniter/core/Utf8_test.php | 91 - tests/codeigniter/core/compat/hash_test.php | 77 - tests/codeigniter/core/compat/mbstring_test.php | 54 - tests/codeigniter/core/compat/password_test.php | 159 - tests/codeigniter/core/compat/standard_test.php | 378 - tests/codeigniter/database/DB_driver_test.php | 39 - tests/codeigniter/database/DB_test.php | 61 - .../database/query_builder/count_test.php | 48 - .../database/query_builder/delete_test.php | 64 - .../database/query_builder/distinct_test.php | 33 - .../database/query_builder/empty_test.php | 39 - .../database/query_builder/escape_test.php | 68 - .../database/query_builder/from_test.php | 49 - .../database/query_builder/get_test.php | 53 - .../database/query_builder/group_test.php | 50 - .../database/query_builder/insert_test.php | 66 - .../database/query_builder/join_test.php | 101 - .../database/query_builder/like_test.php | 106 - .../database/query_builder/limit_test.php | 48 - .../database/query_builder/order_test.php | 55 - .../database/query_builder/select_test.php | 95 - .../database/query_builder/truncate_test.php | 56 - .../database/query_builder/update_test.php | 57 - .../database/query_builder/where_test.php | 134 - tests/codeigniter/helpers/array_helper_test.php | 45 - tests/codeigniter/helpers/captcha_helper_test.php | 10 - tests/codeigniter/helpers/cookie_helper_test.php | 59 - tests/codeigniter/helpers/date_helper_test.php | 325 - .../codeigniter/helpers/directory_helper_test.php | 59 - tests/codeigniter/helpers/download_helper_test.php | 10 - tests/codeigniter/helpers/email_helper_test.php | 24 - tests/codeigniter/helpers/file_helper_test.php | 147 - tests/codeigniter/helpers/form_helper_test.php | 290 - tests/codeigniter/helpers/html_helper_test.php | 106 - .../codeigniter/helpers/inflector_helper_test.php | 96 - tests/codeigniter/helpers/language_helper_test.php | 16 - tests/codeigniter/helpers/number_helper_test.php | 63 - tests/codeigniter/helpers/path_helper_test.php | 30 - tests/codeigniter/helpers/security_helper_test.php | 64 - tests/codeigniter/helpers/string_helper_test.php | 148 - tests/codeigniter/helpers/text_helper_test.php | 174 - tests/codeigniter/helpers/url_helper_test.php | 89 - tests/codeigniter/helpers/xml_helper_test.php | 15 - tests/codeigniter/libraries/Calendar_test.php | 222 - tests/codeigniter/libraries/Driver_test.php | 178 - tests/codeigniter/libraries/Encrypt_test.php | 79 - tests/codeigniter/libraries/Encryption_test.php | 400 - .../codeigniter/libraries/Form_validation_test.php | 626 -- tests/codeigniter/libraries/Parser_test.php | 95 - tests/codeigniter/libraries/Session_test.php | 440 - tests/codeigniter/libraries/Table_test.php | 300 - tests/codeigniter/libraries/Typography_test.php | 182 - tests/codeigniter/libraries/Upload_test.php | 299 - tests/codeigniter/libraries/Useragent_test.php | 125 - tests/mocks/autoloader.php | 119 - tests/mocks/ci_testcase.php | 384 - tests/mocks/ci_testconfig.php | 20 - tests/mocks/core/common.php | 153 - tests/mocks/core/input.php | 49 - tests/mocks/core/security.php | 35 - tests/mocks/core/uri.php | 32 - tests/mocks/core/utf8.php | 19 - tests/mocks/database/ci_test.sqlite | Bin 19456 -> 0 bytes tests/mocks/database/config/mysql.php | 34 - tests/mocks/database/config/mysqli.php | 34 - tests/mocks/database/config/pdo/mysql.php | 37 - tests/mocks/database/config/pdo/pgsql.php | 37 - tests/mocks/database/config/pdo/sqlite.php | 37 - tests/mocks/database/config/pgsql.php | 34 - tests/mocks/database/config/sqlite.php | 34 - tests/mocks/database/db.php | 142 - tests/mocks/database/db/driver.php | 40 - tests/mocks/database/drivers/mysql.php | 16 - tests/mocks/database/drivers/mysqli.php | 16 - tests/mocks/database/drivers/pdo.php | 15 - tests/mocks/database/drivers/postgre.php | 16 - tests/mocks/database/drivers/sqlite.php | 16 - tests/mocks/database/schema/skeleton.php | 155 - tests/mocks/libraries/driver.php | 27 - tests/mocks/libraries/encrypt.php | 16 - tests/mocks/libraries/encryption.php | 39 - tests/mocks/libraries/session.php | 38 - tests/mocks/libraries/table.php | 16 - tests/mocks/uploads/ci_logo.gif | Bin 3270 -> 0 bytes tests/phpunit.xml | 24 - tests/travis/mysql.phpunit.xml | 25 - tests/travis/mysqli.phpunit.xml | 25 - tests/travis/pdo/mysql.phpunit.xml | 25 - tests/travis/pdo/pgsql.phpunit.xml | 25 - tests/travis/pdo/sqlite.phpunit.xml | 25 - tests/travis/pgsql.phpunit.xml | 25 - tests/travis/sqlite.phpunit.xml | 25 - user_guide/.buildinfo | 4 + user_guide/DCO.html | 517 + user_guide/_downloads/ELDocs.tmbundle.zip | Bin 0 -> 3932 bytes user_guide/_images/appflowchart.gif | Bin 0 -> 25276 bytes user_guide/_images/smile.gif | Bin 0 -> 1156 bytes user_guide/_static/ajax-loader.gif | Bin 0 -> 673 bytes user_guide/_static/basic.css | 639 ++ user_guide/_static/ci-icon.ico | Bin 0 -> 5430 bytes user_guide/_static/comment-bright.png | Bin 0 -> 756 bytes user_guide/_static/comment-close.png | Bin 0 -> 829 bytes user_guide/_static/comment.png | Bin 0 -> 641 bytes user_guide/_static/css/badge_only.css | 2 + user_guide/_static/css/citheme.css | 88 + user_guide/_static/css/theme.css | 5 + user_guide/_static/doctools.js | 287 + user_guide/_static/down-pressed.png | Bin 0 -> 222 bytes user_guide/_static/down.png | Bin 0 -> 202 bytes user_guide/_static/file.png | Bin 0 -> 286 bytes user_guide/_static/fonts/FontAwesome.otf | Bin 0 -> 62856 bytes user_guide/_static/fonts/fontawesome-webfont.eot | Bin 0 -> 38205 bytes user_guide/_static/fonts/fontawesome-webfont.svg | 414 + user_guide/_static/fonts/fontawesome-webfont.ttf | Bin 0 -> 80652 bytes user_guide/_static/fonts/fontawesome-webfont.woff | Bin 0 -> 44432 bytes user_guide/_static/images/ci-icon.ico | Bin 0 -> 1150 bytes user_guide/_static/jquery-3.1.0.js | 10074 +++++++++++++++++++ user_guide/_static/jquery.js | 4 + user_guide/_static/js/oldtheme.js | 47 + user_guide/_static/js/theme.js | 131 + user_guide/_static/minus.png | Bin 0 -> 90 bytes user_guide/_static/plus.png | Bin 0 -> 90 bytes user_guide/_static/pygments.css | 63 + user_guide/_static/searchtools.js | 758 ++ user_guide/_static/underscore-1.3.1.js | 999 ++ user_guide/_static/underscore.js | 31 + user_guide/_static/up-pressed.png | Bin 0 -> 214 bytes user_guide/_static/up.png | Bin 0 -> 203 bytes user_guide/_static/websupport.js | 808 ++ user_guide/changelog.html | 4183 ++++++++ user_guide/contributing/index.html | 615 ++ user_guide/database/caching.html | 642 ++ user_guide/database/call_function.html | 529 + user_guide/database/configuration.html | 758 ++ user_guide/database/connecting.html | 641 ++ user_guide/database/db_driver_reference.html | 1483 +++ user_guide/database/examples.html | 597 ++ user_guide/database/forge.html | 1034 ++ user_guide/database/helpers.html | 592 ++ user_guide/database/index.html | 514 + user_guide/database/metadata.html | 614 ++ user_guide/database/queries.html | 658 ++ user_guide/database/query_builder.html | 2714 +++++ user_guide/database/results.html | 1231 +++ user_guide/database/transactions.html | 615 ++ user_guide/database/utilities.html | 993 ++ user_guide/documentation/index.html | 702 ++ user_guide/general/alternative_php.html | 566 ++ user_guide/general/ancillary_classes.html | 578 ++ user_guide/general/autoloader.html | 519 + user_guide/general/caching.html | 563 ++ user_guide/general/cli.html | 573 ++ user_guide/general/common_functions.html | 776 ++ user_guide/general/compatibility_functions.html | 914 ++ user_guide/general/controllers.html | 845 ++ user_guide/general/core_classes.html | 607 ++ user_guide/general/creating_drivers.html | 524 + user_guide/general/creating_libraries.html | 754 ++ user_guide/general/credits.html | 502 + user_guide/general/drivers.html | 530 + user_guide/general/environments.html | 538 + user_guide/general/errors.html | 649 ++ user_guide/general/helpers.html | 629 ++ user_guide/general/hooks.html | 617 ++ user_guide/general/index.html | 523 + user_guide/general/libraries.html | 521 + user_guide/general/managing_apps.html | 554 + user_guide/general/models.html | 673 ++ user_guide/general/profiling.html | 624 ++ user_guide/general/requirements.html | 511 + user_guide/general/reserved_names.html | 583 ++ user_guide/general/routing.html | 689 ++ user_guide/general/security.html | 663 ++ user_guide/general/styleguide.html | 1128 +++ user_guide/general/urls.html | 597 ++ user_guide/general/views.html | 704 ++ user_guide/general/welcome.html | 520 + user_guide/genindex.html | 1935 ++++ user_guide/helpers/array_helper.html | 660 ++ user_guide/helpers/captcha_helper.html | 676 ++ user_guide/helpers/cookie_helper.html | 608 ++ user_guide/helpers/date_helper.html | 1256 +++ user_guide/helpers/directory_helper.html | 587 ++ user_guide/helpers/download_helper.html | 556 + user_guide/helpers/email_helper.html | 598 ++ user_guide/helpers/file_helper.html | 829 ++ user_guide/helpers/form_helper.html | 1598 +++ user_guide/helpers/html_helper.html | 1091 ++ user_guide/helpers/index.html | 518 + user_guide/helpers/inflector_helper.html | 680 ++ user_guide/helpers/language_helper.html | 550 + user_guide/helpers/number_helper.html | 559 + user_guide/helpers/path_helper.html | 557 + user_guide/helpers/security_helper.html | 669 ++ user_guide/helpers/smiley_helper.html | 708 ++ user_guide/helpers/string_helper.html | 873 ++ user_guide/helpers/text_helper.html | 847 ++ user_guide/helpers/typography_helper.html | 607 ++ user_guide/helpers/url_helper.html | 1044 ++ user_guide/helpers/xml_helper.html | 559 + user_guide/index.html | 712 ++ user_guide/installation/downloads.html | 535 + user_guide/installation/index.html | 532 + user_guide/installation/troubleshooting.html | 511 + user_guide/installation/upgrade_120.html | 516 + user_guide/installation/upgrade_130.html | 619 ++ user_guide/installation/upgrade_131.html | 527 + user_guide/installation/upgrade_132.html | 525 + user_guide/installation/upgrade_133.html | 539 + user_guide/installation/upgrade_140.html | 567 ++ user_guide/installation/upgrade_141.html | 564 ++ user_guide/installation/upgrade_150.html | 591 ++ user_guide/installation/upgrade_152.html | 536 + user_guide/installation/upgrade_153.html | 523 + user_guide/installation/upgrade_154.html | 547 + user_guide/installation/upgrade_160.html | 566 ++ user_guide/installation/upgrade_161.html | 522 + user_guide/installation/upgrade_162.html | 537 + user_guide/installation/upgrade_163.html | 522 + user_guide/installation/upgrade_170.html | 549 + user_guide/installation/upgrade_171.html | 522 + user_guide/installation/upgrade_172.html | 539 + user_guide/installation/upgrade_200.html | 632 ++ user_guide/installation/upgrade_201.html | 532 + user_guide/installation/upgrade_202.html | 525 + user_guide/installation/upgrade_203.html | 555 + user_guide/installation/upgrade_210.html | 519 + user_guide/installation/upgrade_211.html | 523 + user_guide/installation/upgrade_212.html | 514 + user_guide/installation/upgrade_213.html | 514 + user_guide/installation/upgrade_214.html | 509 + user_guide/installation/upgrade_220.html | 518 + user_guide/installation/upgrade_221.html | 509 + user_guide/installation/upgrade_222.html | 509 + user_guide/installation/upgrade_223.html | 509 + user_guide/installation/upgrade_300.html | 1330 +++ user_guide/installation/upgrade_301.html | 513 + user_guide/installation/upgrade_302.html | 520 + user_guide/installation/upgrade_303.html | 547 + user_guide/installation/upgrade_304.html | 509 + user_guide/installation/upgrade_305.html | 509 + user_guide/installation/upgrade_306.html | 539 + user_guide/installation/upgrade_310.html | 527 + user_guide/installation/upgrade_311.html | 509 + user_guide/installation/upgrade_312.html | 534 + user_guide/installation/upgrade_313.html | 539 + user_guide/installation/upgrade_314.html | 509 + user_guide/installation/upgrade_315.html | 509 + user_guide/installation/upgrade_316.html | 523 + user_guide/installation/upgrade_317.html | 522 + user_guide/installation/upgrade_318.html | 509 + user_guide/installation/upgrade_b11.html | 567 ++ user_guide/installation/upgrading.html | 550 + user_guide/libraries/benchmark.html | 703 ++ user_guide/libraries/caching.html | 895 ++ user_guide/libraries/calendar.html | 972 ++ user_guide/libraries/cart.html | 1025 ++ user_guide/libraries/config.html | 834 ++ user_guide/libraries/email.html | 1218 +++ user_guide/libraries/encrypt.html | 787 ++ user_guide/libraries/encryption.html | 1405 +++ user_guide/libraries/file_uploading.html | 1025 ++ user_guide/libraries/form_validation.html | 1932 ++++ user_guide/libraries/ftp.html | 1016 ++ user_guide/libraries/image_lib.html | 1255 +++ user_guide/libraries/index.html | 527 + user_guide/libraries/input.html | 1191 +++ user_guide/libraries/javascript.html | 802 ++ user_guide/libraries/language.html | 733 ++ user_guide/libraries/loader.html | 1213 +++ user_guide/libraries/migration.html | 758 ++ user_guide/libraries/output.html | 912 ++ user_guide/libraries/pagination.html | 784 ++ user_guide/libraries/parser.html | 850 ++ user_guide/libraries/security.html | 739 ++ user_guide/libraries/sessions.html | 1922 ++++ user_guide/libraries/table.html | 911 ++ user_guide/libraries/trackback.html | 1035 ++ user_guide/libraries/typography.html | 657 ++ user_guide/libraries/unit_testing.html | 846 ++ user_guide/libraries/uri.html | 890 ++ user_guide/libraries/user_agent.html | 931 ++ user_guide/libraries/xmlrpc.html | 1151 +++ user_guide/libraries/zip.html | 846 ++ user_guide/license.html | 509 + user_guide/objects.inv | Bin 0 -> 7332 bytes user_guide/overview/appflow.html | 513 + user_guide/overview/at_a_glance.html | 599 ++ user_guide/overview/features.html | 538 + user_guide/overview/getting_started.html | 512 + user_guide/overview/goals.html | 522 + user_guide/overview/index.html | 504 + user_guide/overview/mvc.html | 519 + user_guide/search.html | 499 + user_guide/searchindex.js | 1 + user_guide/tutorial/conclusion.html | 515 + user_guide/tutorial/create_news_items.html | 629 ++ user_guide/tutorial/index.html | 525 + user_guide/tutorial/news_section.html | 685 ++ user_guide/tutorial/static_pages.html | 633 ++ user_guide_src/Makefile | 130 - user_guide_src/README.rst | 65 - user_guide_src/cilexer/README | 22 - user_guide_src/cilexer/cilexer/__init__.py | 1 - user_guide_src/cilexer/cilexer/cilexer.py | 56 - user_guide_src/cilexer/setup.py | 23 - user_guide_src/source/DCO.rst | 27 - .../source/_themes/sphinx_rtd_theme/LICENSE | 20 - .../source/_themes/sphinx_rtd_theme/__init__.py | 17 - .../_themes/sphinx_rtd_theme/breadcrumbs.html | 22 - .../source/_themes/sphinx_rtd_theme/footer.html | 33 - .../source/_themes/sphinx_rtd_theme/layout.html | 166 - .../_themes/sphinx_rtd_theme/layout_old.html | 205 - .../source/_themes/sphinx_rtd_theme/pulldown.html | 17 - .../source/_themes/sphinx_rtd_theme/search.html | 50 - .../source/_themes/sphinx_rtd_theme/searchbox.html | 9 - .../sphinx_rtd_theme/static/css/badge_only.css | 2 - .../sphinx_rtd_theme/static/css/citheme.css | 88 - .../_themes/sphinx_rtd_theme/static/css/theme.css | 5 - .../sphinx_rtd_theme/static/fonts/FontAwesome.otf | Bin 62856 -> 0 bytes .../static/fonts/fontawesome-webfont.eot | Bin 38205 -> 0 bytes .../static/fonts/fontawesome-webfont.svg | 414 - .../static/fonts/fontawesome-webfont.ttf | Bin 80652 -> 0 bytes .../static/fonts/fontawesome-webfont.woff | Bin 44432 -> 0 bytes .../sphinx_rtd_theme/static/images/ci-icon.ico | Bin 1150 -> 0 bytes .../_themes/sphinx_rtd_theme/static/js/oldtheme.js | 47 - .../_themes/sphinx_rtd_theme/static/js/theme.js | 131 - .../source/_themes/sphinx_rtd_theme/theme.conf | 8 - .../source/_themes/sphinx_rtd_theme/versions.html | 37 - user_guide_src/source/changelog.rst | 3623 ------- user_guide_src/source/conf.py | 263 - user_guide_src/source/contributing/index.rst | 159 - user_guide_src/source/database/caching.rst | 162 - user_guide_src/source/database/call_function.rst | 39 - user_guide_src/source/database/configuration.rst | 207 - user_guide_src/source/database/connecting.rst | 155 - .../source/database/db_driver_reference.rst | 439 - user_guide_src/source/database/examples.rst | 119 - user_guide_src/source/database/forge.rst | 412 - user_guide_src/source/database/helpers.rst | 100 - user_guide_src/source/database/index.rst | 25 - user_guide_src/source/database/metadata.rst | 130 - user_guide_src/source/database/queries.rst | 176 - user_guide_src/source/database/query_builder.rst | 1570 --- user_guide_src/source/database/results.rst | 507 - user_guide_src/source/database/transactions.rst | 127 - user_guide_src/source/database/utilities.rst | 316 - .../source/documentation/ELDocs.tmbundle.zip | Bin 3932 -> 0 bytes user_guide_src/source/documentation/index.rst | 202 - user_guide_src/source/general/alternative_php.rst | 75 - .../source/general/ancillary_classes.rst | 80 - user_guide_src/source/general/autoloader.rst | 27 - user_guide_src/source/general/caching.rst | 71 - user_guide_src/source/general/cli.rst | 78 - user_guide_src/source/general/common_functions.rst | 188 - .../source/general/compatibility_functions.rst | 232 - user_guide_src/source/general/controllers.rst | 340 - user_guide_src/source/general/core_classes.rst | 117 - user_guide_src/source/general/creating_drivers.rst | 25 - .../source/general/creating_libraries.rst | 260 - user_guide_src/source/general/credits.rst | 22 - user_guide_src/source/general/drivers.rst | 40 - user_guide_src/source/general/environments.rst | 52 - user_guide_src/source/general/errors.rst | 120 - user_guide_src/source/general/helpers.rst | 145 - user_guide_src/source/general/hooks.rst | 127 - user_guide_src/source/general/index.rst | 33 - user_guide_src/source/general/libraries.rst | 32 - user_guide_src/source/general/managing_apps.rst | 61 - user_guide_src/source/general/models.rst | 167 - user_guide_src/source/general/profiling.rst | 90 - user_guide_src/source/general/requirements.rst | 21 - user_guide_src/source/general/reserved_names.rst | 88 - user_guide_src/source/general/routing.rst | 207 - user_guide_src/source/general/security.rst | 200 - user_guide_src/source/general/styleguide.rst | 636 -- user_guide_src/source/general/urls.rst | 100 - user_guide_src/source/general/views.rst | 213 - user_guide_src/source/general/welcome.rst | 32 - user_guide_src/source/helpers/array_helper.rst | 133 - user_guide_src/source/helpers/captcha_helper.rst | 168 - user_guide_src/source/helpers/cookie_helper.rst | 79 - user_guide_src/source/helpers/date_helper.rst | 440 - user_guide_src/source/helpers/directory_helper.rst | 83 - user_guide_src/source/helpers/download_helper.rst | 56 - user_guide_src/source/helpers/email_helper.rst | 75 - user_guide_src/source/helpers/file_helper.rst | 202 - user_guide_src/source/helpers/form_helper.rst | 743 -- user_guide_src/source/helpers/html_helper.rst | 407 - user_guide_src/source/helpers/index.rst | 9 - user_guide_src/source/helpers/inflector_helper.rst | 96 - user_guide_src/source/helpers/language_helper.rst | 46 - user_guide_src/source/helpers/number_helper.rst | 52 - user_guide_src/source/helpers/path_helper.rst | 53 - user_guide_src/source/helpers/security_helper.rst | 106 - user_guide_src/source/helpers/smiley_helper.rst | 169 - user_guide_src/source/helpers/string_helper.rst | 223 - user_guide_src/source/helpers/text_helper.rst | 230 - .../source/helpers/typography_helper.rst | 75 - user_guide_src/source/helpers/url_helper.rst | 373 - user_guide_src/source/helpers/xml_helper.rst | 55 - user_guide_src/source/images/appflowchart.gif | Bin 25276 -> 0 bytes user_guide_src/source/images/arrow.gif | Bin 123 -> 0 bytes user_guide_src/source/images/ci-icon.ico | Bin 5430 -> 0 bytes user_guide_src/source/images/ci_logo.jpg | Bin 5602 -> 0 bytes user_guide_src/source/images/ci_logo_flame.jpg | Bin 8589 -> 0 bytes user_guide_src/source/images/file.gif | Bin 370 -> 0 bytes user_guide_src/source/images/folder.gif | Bin 570 -> 0 bytes user_guide_src/source/images/smile.gif | Bin 1156 -> 0 bytes user_guide_src/source/index.rst | 122 - user_guide_src/source/installation/downloads.rst | 45 - user_guide_src/source/installation/index.rst | 57 - .../source/installation/troubleshooting.rst | 18 - user_guide_src/source/installation/upgrade_120.rst | 20 - user_guide_src/source/installation/upgrade_130.rst | 125 - user_guide_src/source/installation/upgrade_131.rst | 30 - user_guide_src/source/installation/upgrade_132.rst | 28 - user_guide_src/source/installation/upgrade_133.rst | 44 - user_guide_src/source/installation/upgrade_140.rst | 72 - user_guide_src/source/installation/upgrade_141.rst | 71 - user_guide_src/source/installation/upgrade_150.rst | 100 - user_guide_src/source/installation/upgrade_152.rst | 39 - user_guide_src/source/installation/upgrade_153.rst | 28 - user_guide_src/source/installation/upgrade_154.rst | 56 - user_guide_src/source/installation/upgrade_160.rst | 87 - user_guide_src/source/installation/upgrade_161.rst | 27 - user_guide_src/source/installation/upgrade_162.rst | 45 - user_guide_src/source/installation/upgrade_163.rst | 27 - user_guide_src/source/installation/upgrade_170.rst | 56 - user_guide_src/source/installation/upgrade_171.rst | 27 - user_guide_src/source/installation/upgrade_172.rst | 48 - user_guide_src/source/installation/upgrade_200.rst | 148 - user_guide_src/source/installation/upgrade_201.rst | 39 - user_guide_src/source/installation/upgrade_202.rst | 33 - user_guide_src/source/installation/upgrade_203.rst | 63 - user_guide_src/source/installation/upgrade_210.rst | 26 - user_guide_src/source/installation/upgrade_211.rst | 31 - user_guide_src/source/installation/upgrade_212.rst | 20 - user_guide_src/source/installation/upgrade_213.rst | 20 - user_guide_src/source/installation/upgrade_214.rst | 14 - user_guide_src/source/installation/upgrade_220.rst | 21 - user_guide_src/source/installation/upgrade_221.rst | 14 - user_guide_src/source/installation/upgrade_222.rst | 14 - user_guide_src/source/installation/upgrade_223.rst | 14 - user_guide_src/source/installation/upgrade_300.rst | 891 -- user_guide_src/source/installation/upgrade_301.rst | 19 - user_guide_src/source/installation/upgrade_302.rst | 24 - user_guide_src/source/installation/upgrade_303.rst | 55 - user_guide_src/source/installation/upgrade_304.rst | 14 - user_guide_src/source/installation/upgrade_305.rst | 14 - user_guide_src/source/installation/upgrade_306.rst | 48 - user_guide_src/source/installation/upgrade_310.rst | 38 - user_guide_src/source/installation/upgrade_311.rst | 14 - user_guide_src/source/installation/upgrade_312.rst | 40 - user_guide_src/source/installation/upgrade_313.rst | 46 - user_guide_src/source/installation/upgrade_314.rst | 14 - user_guide_src/source/installation/upgrade_315.rst | 14 - user_guide_src/source/installation/upgrade_316.rst | 28 - user_guide_src/source/installation/upgrade_317.rst | 27 - user_guide_src/source/installation/upgrade_318.rst | 14 - user_guide_src/source/installation/upgrade_b11.rst | 78 - user_guide_src/source/installation/upgrading.rst | 58 - user_guide_src/source/libraries/benchmark.rst | 168 - user_guide_src/source/libraries/caching.rst | 279 - user_guide_src/source/libraries/calendar.rst | 307 - user_guide_src/source/libraries/cart.rst | 398 - user_guide_src/source/libraries/config.rst | 252 - user_guide_src/source/libraries/email.rst | 405 - user_guide_src/source/libraries/encrypt.rst | 198 - user_guide_src/source/libraries/encryption.rst | 585 -- user_guide_src/source/libraries/file_uploading.rst | 355 - .../source/libraries/form_validation.rst | 1143 --- user_guide_src/source/libraries/ftp.rst | 306 - user_guide_src/source/libraries/image_lib.rst | 475 - user_guide_src/source/libraries/index.rst | 9 - user_guide_src/source/libraries/input.rst | 474 - user_guide_src/source/libraries/javascript.rst | 322 - user_guide_src/source/libraries/language.rst | 210 - user_guide_src/source/libraries/loader.rst | 461 - user_guide_src/source/libraries/migration.rst | 184 - user_guide_src/source/libraries/output.rst | 233 - user_guide_src/source/libraries/pagination.rst | 314 - user_guide_src/source/libraries/parser.rst | 309 - user_guide_src/source/libraries/security.rst | 172 - user_guide_src/source/libraries/sessions.rst | 1062 -- user_guide_src/source/libraries/table.rst | 297 - user_guide_src/source/libraries/trackback.rst | 339 - user_guide_src/source/libraries/typography.rst | 107 - user_guide_src/source/libraries/unit_testing.rst | 245 - user_guide_src/source/libraries/uri.rst | 233 - user_guide_src/source/libraries/user_agent.rst | 248 - user_guide_src/source/libraries/xmlrpc.rst | 582 -- user_guide_src/source/libraries/zip.rst | 243 - user_guide_src/source/license.rst | 23 - user_guide_src/source/overview/appflow.rst | 23 - user_guide_src/source/overview/at_a_glance.rst | 114 - user_guide_src/source/overview/features.rst | 46 - user_guide_src/source/overview/getting_started.rst | 24 - user_guide_src/source/overview/goals.rst | 32 - user_guide_src/source/overview/index.rst | 15 - user_guide_src/source/overview/mvc.rst | 27 - user_guide_src/source/tutorial/conclusion.rst | 26 - .../source/tutorial/create_news_items.rst | 153 - user_guide_src/source/tutorial/index.rst | 46 - user_guide_src/source/tutorial/news_section.rst | 218 - user_guide_src/source/tutorial/static_pages.rst | 170 - 524 files changed, 139227 insertions(+), 44109 deletions(-) delete mode 100644 .travis.yml delete mode 100644 DCO.txt delete mode 100755 build-release.sh delete mode 100644 phpdoc.dist.xml delete mode 100644 tests/Bootstrap.php delete mode 100644 tests/README.md delete mode 100644 tests/codeigniter/Setup_test.php delete mode 100644 tests/codeigniter/core/Benchmark_test.php delete mode 100644 tests/codeigniter/core/Common_test.php delete mode 100644 tests/codeigniter/core/Config_test.php delete mode 100644 tests/codeigniter/core/Input_test.php delete mode 100644 tests/codeigniter/core/Lang_test.php delete mode 100644 tests/codeigniter/core/Loader_test.php delete mode 100644 tests/codeigniter/core/Log_test.php delete mode 100644 tests/codeigniter/core/Model_test.php delete mode 100644 tests/codeigniter/core/Output_test.php delete mode 100644 tests/codeigniter/core/Security_test.php delete mode 100644 tests/codeigniter/core/URI_test.php delete mode 100644 tests/codeigniter/core/Utf8_test.php delete mode 100644 tests/codeigniter/core/compat/hash_test.php delete mode 100644 tests/codeigniter/core/compat/mbstring_test.php delete mode 100644 tests/codeigniter/core/compat/password_test.php delete mode 100644 tests/codeigniter/core/compat/standard_test.php delete mode 100644 tests/codeigniter/database/DB_driver_test.php delete mode 100644 tests/codeigniter/database/DB_test.php delete mode 100644 tests/codeigniter/database/query_builder/count_test.php delete mode 100644 tests/codeigniter/database/query_builder/delete_test.php delete mode 100644 tests/codeigniter/database/query_builder/distinct_test.php delete mode 100644 tests/codeigniter/database/query_builder/empty_test.php delete mode 100644 tests/codeigniter/database/query_builder/escape_test.php delete mode 100644 tests/codeigniter/database/query_builder/from_test.php delete mode 100644 tests/codeigniter/database/query_builder/get_test.php delete mode 100644 tests/codeigniter/database/query_builder/group_test.php delete mode 100644 tests/codeigniter/database/query_builder/insert_test.php delete mode 100644 tests/codeigniter/database/query_builder/join_test.php delete mode 100644 tests/codeigniter/database/query_builder/like_test.php delete mode 100644 tests/codeigniter/database/query_builder/limit_test.php delete mode 100644 tests/codeigniter/database/query_builder/order_test.php delete mode 100644 tests/codeigniter/database/query_builder/select_test.php delete mode 100644 tests/codeigniter/database/query_builder/truncate_test.php delete mode 100644 tests/codeigniter/database/query_builder/update_test.php delete mode 100644 tests/codeigniter/database/query_builder/where_test.php delete mode 100644 tests/codeigniter/helpers/array_helper_test.php delete mode 100644 tests/codeigniter/helpers/captcha_helper_test.php delete mode 100644 tests/codeigniter/helpers/cookie_helper_test.php delete mode 100644 tests/codeigniter/helpers/date_helper_test.php delete mode 100644 tests/codeigniter/helpers/directory_helper_test.php delete mode 100644 tests/codeigniter/helpers/download_helper_test.php delete mode 100644 tests/codeigniter/helpers/email_helper_test.php delete mode 100644 tests/codeigniter/helpers/file_helper_test.php delete mode 100644 tests/codeigniter/helpers/form_helper_test.php delete mode 100644 tests/codeigniter/helpers/html_helper_test.php delete mode 100644 tests/codeigniter/helpers/inflector_helper_test.php delete mode 100644 tests/codeigniter/helpers/language_helper_test.php delete mode 100644 tests/codeigniter/helpers/number_helper_test.php delete mode 100644 tests/codeigniter/helpers/path_helper_test.php delete mode 100644 tests/codeigniter/helpers/security_helper_test.php delete mode 100644 tests/codeigniter/helpers/string_helper_test.php delete mode 100644 tests/codeigniter/helpers/text_helper_test.php delete mode 100644 tests/codeigniter/helpers/url_helper_test.php delete mode 100644 tests/codeigniter/helpers/xml_helper_test.php delete mode 100644 tests/codeigniter/libraries/Calendar_test.php delete mode 100644 tests/codeigniter/libraries/Driver_test.php delete mode 100644 tests/codeigniter/libraries/Encrypt_test.php delete mode 100644 tests/codeigniter/libraries/Encryption_test.php delete mode 100644 tests/codeigniter/libraries/Form_validation_test.php delete mode 100644 tests/codeigniter/libraries/Parser_test.php delete mode 100644 tests/codeigniter/libraries/Session_test.php delete mode 100644 tests/codeigniter/libraries/Table_test.php delete mode 100644 tests/codeigniter/libraries/Typography_test.php delete mode 100644 tests/codeigniter/libraries/Upload_test.php delete mode 100644 tests/codeigniter/libraries/Useragent_test.php delete mode 100644 tests/mocks/autoloader.php delete mode 100644 tests/mocks/ci_testcase.php delete mode 100644 tests/mocks/ci_testconfig.php delete mode 100644 tests/mocks/core/common.php delete mode 100644 tests/mocks/core/input.php delete mode 100644 tests/mocks/core/security.php delete mode 100644 tests/mocks/core/uri.php delete mode 100644 tests/mocks/core/utf8.php delete mode 100755 tests/mocks/database/ci_test.sqlite delete mode 100644 tests/mocks/database/config/mysql.php delete mode 100644 tests/mocks/database/config/mysqli.php delete mode 100644 tests/mocks/database/config/pdo/mysql.php delete mode 100644 tests/mocks/database/config/pdo/pgsql.php delete mode 100644 tests/mocks/database/config/pdo/sqlite.php delete mode 100644 tests/mocks/database/config/pgsql.php delete mode 100644 tests/mocks/database/config/sqlite.php delete mode 100644 tests/mocks/database/db.php delete mode 100644 tests/mocks/database/db/driver.php delete mode 100644 tests/mocks/database/drivers/mysql.php delete mode 100644 tests/mocks/database/drivers/mysqli.php delete mode 100644 tests/mocks/database/drivers/pdo.php delete mode 100644 tests/mocks/database/drivers/postgre.php delete mode 100644 tests/mocks/database/drivers/sqlite.php delete mode 100644 tests/mocks/database/schema/skeleton.php delete mode 100644 tests/mocks/libraries/driver.php delete mode 100644 tests/mocks/libraries/encrypt.php delete mode 100644 tests/mocks/libraries/encryption.php delete mode 100644 tests/mocks/libraries/session.php delete mode 100644 tests/mocks/libraries/table.php delete mode 100644 tests/mocks/uploads/ci_logo.gif delete mode 100644 tests/phpunit.xml delete mode 100644 tests/travis/mysql.phpunit.xml delete mode 100644 tests/travis/mysqli.phpunit.xml delete mode 100644 tests/travis/pdo/mysql.phpunit.xml delete mode 100644 tests/travis/pdo/pgsql.phpunit.xml delete mode 100644 tests/travis/pdo/sqlite.phpunit.xml delete mode 100644 tests/travis/pgsql.phpunit.xml delete mode 100644 tests/travis/sqlite.phpunit.xml create mode 100644 user_guide/.buildinfo create mode 100644 user_guide/DCO.html create mode 100644 user_guide/_downloads/ELDocs.tmbundle.zip create mode 100644 user_guide/_images/appflowchart.gif create mode 100644 user_guide/_images/smile.gif create mode 100644 user_guide/_static/ajax-loader.gif create mode 100644 user_guide/_static/basic.css create mode 100644 user_guide/_static/ci-icon.ico create mode 100644 user_guide/_static/comment-bright.png create mode 100644 user_guide/_static/comment-close.png create mode 100644 user_guide/_static/comment.png create mode 100644 user_guide/_static/css/badge_only.css create mode 100644 user_guide/_static/css/citheme.css create mode 100644 user_guide/_static/css/theme.css create mode 100644 user_guide/_static/doctools.js create mode 100644 user_guide/_static/down-pressed.png create mode 100644 user_guide/_static/down.png create mode 100644 user_guide/_static/file.png create mode 100644 user_guide/_static/fonts/FontAwesome.otf create mode 100644 user_guide/_static/fonts/fontawesome-webfont.eot create mode 100644 user_guide/_static/fonts/fontawesome-webfont.svg create mode 100644 user_guide/_static/fonts/fontawesome-webfont.ttf create mode 100644 user_guide/_static/fonts/fontawesome-webfont.woff create mode 100644 user_guide/_static/images/ci-icon.ico create mode 100644 user_guide/_static/jquery-3.1.0.js create mode 100644 user_guide/_static/jquery.js create mode 100644 user_guide/_static/js/oldtheme.js create mode 100644 user_guide/_static/js/theme.js create mode 100644 user_guide/_static/minus.png create mode 100644 user_guide/_static/plus.png create mode 100644 user_guide/_static/pygments.css create mode 100644 user_guide/_static/searchtools.js create mode 100644 user_guide/_static/underscore-1.3.1.js create mode 100644 user_guide/_static/underscore.js create mode 100644 user_guide/_static/up-pressed.png create mode 100644 user_guide/_static/up.png create mode 100644 user_guide/_static/websupport.js create mode 100644 user_guide/changelog.html create mode 100644 user_guide/contributing/index.html create mode 100644 user_guide/database/caching.html create mode 100644 user_guide/database/call_function.html create mode 100644 user_guide/database/configuration.html create mode 100644 user_guide/database/connecting.html create mode 100644 user_guide/database/db_driver_reference.html create mode 100644 user_guide/database/examples.html create mode 100644 user_guide/database/forge.html create mode 100644 user_guide/database/helpers.html create mode 100644 user_guide/database/index.html create mode 100644 user_guide/database/metadata.html create mode 100644 user_guide/database/queries.html create mode 100644 user_guide/database/query_builder.html create mode 100644 user_guide/database/results.html create mode 100644 user_guide/database/transactions.html create mode 100644 user_guide/database/utilities.html create mode 100644 user_guide/documentation/index.html create mode 100644 user_guide/general/alternative_php.html create mode 100644 user_guide/general/ancillary_classes.html create mode 100644 user_guide/general/autoloader.html create mode 100644 user_guide/general/caching.html create mode 100644 user_guide/general/cli.html create mode 100644 user_guide/general/common_functions.html create mode 100644 user_guide/general/compatibility_functions.html create mode 100644 user_guide/general/controllers.html create mode 100644 user_guide/general/core_classes.html create mode 100644 user_guide/general/creating_drivers.html create mode 100644 user_guide/general/creating_libraries.html create mode 100644 user_guide/general/credits.html create mode 100644 user_guide/general/drivers.html create mode 100644 user_guide/general/environments.html create mode 100644 user_guide/general/errors.html create mode 100644 user_guide/general/helpers.html create mode 100644 user_guide/general/hooks.html create mode 100644 user_guide/general/index.html create mode 100644 user_guide/general/libraries.html create mode 100644 user_guide/general/managing_apps.html create mode 100644 user_guide/general/models.html create mode 100644 user_guide/general/profiling.html create mode 100644 user_guide/general/requirements.html create mode 100644 user_guide/general/reserved_names.html create mode 100644 user_guide/general/routing.html create mode 100644 user_guide/general/security.html create mode 100644 user_guide/general/styleguide.html create mode 100644 user_guide/general/urls.html create mode 100644 user_guide/general/views.html create mode 100644 user_guide/general/welcome.html create mode 100644 user_guide/genindex.html create mode 100644 user_guide/helpers/array_helper.html create mode 100644 user_guide/helpers/captcha_helper.html create mode 100644 user_guide/helpers/cookie_helper.html create mode 100644 user_guide/helpers/date_helper.html create mode 100644 user_guide/helpers/directory_helper.html create mode 100644 user_guide/helpers/download_helper.html create mode 100644 user_guide/helpers/email_helper.html create mode 100644 user_guide/helpers/file_helper.html create mode 100644 user_guide/helpers/form_helper.html create mode 100644 user_guide/helpers/html_helper.html create mode 100644 user_guide/helpers/index.html create mode 100644 user_guide/helpers/inflector_helper.html create mode 100644 user_guide/helpers/language_helper.html create mode 100644 user_guide/helpers/number_helper.html create mode 100644 user_guide/helpers/path_helper.html create mode 100644 user_guide/helpers/security_helper.html create mode 100644 user_guide/helpers/smiley_helper.html create mode 100644 user_guide/helpers/string_helper.html create mode 100644 user_guide/helpers/text_helper.html create mode 100644 user_guide/helpers/typography_helper.html create mode 100644 user_guide/helpers/url_helper.html create mode 100644 user_guide/helpers/xml_helper.html create mode 100644 user_guide/index.html create mode 100644 user_guide/installation/downloads.html create mode 100644 user_guide/installation/index.html create mode 100644 user_guide/installation/troubleshooting.html create mode 100644 user_guide/installation/upgrade_120.html create mode 100644 user_guide/installation/upgrade_130.html create mode 100644 user_guide/installation/upgrade_131.html create mode 100644 user_guide/installation/upgrade_132.html create mode 100644 user_guide/installation/upgrade_133.html create mode 100644 user_guide/installation/upgrade_140.html create mode 100644 user_guide/installation/upgrade_141.html create mode 100644 user_guide/installation/upgrade_150.html create mode 100644 user_guide/installation/upgrade_152.html create mode 100644 user_guide/installation/upgrade_153.html create mode 100644 user_guide/installation/upgrade_154.html create mode 100644 user_guide/installation/upgrade_160.html create mode 100644 user_guide/installation/upgrade_161.html create mode 100644 user_guide/installation/upgrade_162.html create mode 100644 user_guide/installation/upgrade_163.html create mode 100644 user_guide/installation/upgrade_170.html create mode 100644 user_guide/installation/upgrade_171.html create mode 100644 user_guide/installation/upgrade_172.html create mode 100644 user_guide/installation/upgrade_200.html create mode 100644 user_guide/installation/upgrade_201.html create mode 100644 user_guide/installation/upgrade_202.html create mode 100644 user_guide/installation/upgrade_203.html create mode 100644 user_guide/installation/upgrade_210.html create mode 100644 user_guide/installation/upgrade_211.html create mode 100644 user_guide/installation/upgrade_212.html create mode 100644 user_guide/installation/upgrade_213.html create mode 100644 user_guide/installation/upgrade_214.html create mode 100644 user_guide/installation/upgrade_220.html create mode 100644 user_guide/installation/upgrade_221.html create mode 100644 user_guide/installation/upgrade_222.html create mode 100644 user_guide/installation/upgrade_223.html create mode 100644 user_guide/installation/upgrade_300.html create mode 100644 user_guide/installation/upgrade_301.html create mode 100644 user_guide/installation/upgrade_302.html create mode 100644 user_guide/installation/upgrade_303.html create mode 100644 user_guide/installation/upgrade_304.html create mode 100644 user_guide/installation/upgrade_305.html create mode 100644 user_guide/installation/upgrade_306.html create mode 100644 user_guide/installation/upgrade_310.html create mode 100644 user_guide/installation/upgrade_311.html create mode 100644 user_guide/installation/upgrade_312.html create mode 100644 user_guide/installation/upgrade_313.html create mode 100644 user_guide/installation/upgrade_314.html create mode 100644 user_guide/installation/upgrade_315.html create mode 100644 user_guide/installation/upgrade_316.html create mode 100644 user_guide/installation/upgrade_317.html create mode 100644 user_guide/installation/upgrade_318.html create mode 100644 user_guide/installation/upgrade_b11.html create mode 100644 user_guide/installation/upgrading.html create mode 100644 user_guide/libraries/benchmark.html create mode 100644 user_guide/libraries/caching.html create mode 100644 user_guide/libraries/calendar.html create mode 100644 user_guide/libraries/cart.html create mode 100644 user_guide/libraries/config.html create mode 100644 user_guide/libraries/email.html create mode 100644 user_guide/libraries/encrypt.html create mode 100644 user_guide/libraries/encryption.html create mode 100644 user_guide/libraries/file_uploading.html create mode 100644 user_guide/libraries/form_validation.html create mode 100644 user_guide/libraries/ftp.html create mode 100644 user_guide/libraries/image_lib.html create mode 100644 user_guide/libraries/index.html create mode 100644 user_guide/libraries/input.html create mode 100644 user_guide/libraries/javascript.html create mode 100644 user_guide/libraries/language.html create mode 100644 user_guide/libraries/loader.html create mode 100644 user_guide/libraries/migration.html create mode 100644 user_guide/libraries/output.html create mode 100644 user_guide/libraries/pagination.html create mode 100644 user_guide/libraries/parser.html create mode 100644 user_guide/libraries/security.html create mode 100644 user_guide/libraries/sessions.html create mode 100644 user_guide/libraries/table.html create mode 100644 user_guide/libraries/trackback.html create mode 100644 user_guide/libraries/typography.html create mode 100644 user_guide/libraries/unit_testing.html create mode 100644 user_guide/libraries/uri.html create mode 100644 user_guide/libraries/user_agent.html create mode 100644 user_guide/libraries/xmlrpc.html create mode 100644 user_guide/libraries/zip.html create mode 100644 user_guide/license.html create mode 100644 user_guide/objects.inv create mode 100644 user_guide/overview/appflow.html create mode 100644 user_guide/overview/at_a_glance.html create mode 100644 user_guide/overview/features.html create mode 100644 user_guide/overview/getting_started.html create mode 100644 user_guide/overview/goals.html create mode 100644 user_guide/overview/index.html create mode 100644 user_guide/overview/mvc.html create mode 100644 user_guide/search.html create mode 100644 user_guide/searchindex.js create mode 100644 user_guide/tutorial/conclusion.html create mode 100644 user_guide/tutorial/create_news_items.html create mode 100644 user_guide/tutorial/index.html create mode 100644 user_guide/tutorial/news_section.html create mode 100644 user_guide/tutorial/static_pages.html delete mode 100644 user_guide_src/Makefile delete mode 100644 user_guide_src/README.rst delete mode 100644 user_guide_src/cilexer/README delete mode 100644 user_guide_src/cilexer/cilexer/__init__.py delete mode 100644 user_guide_src/cilexer/cilexer/cilexer.py delete mode 100644 user_guide_src/cilexer/setup.py delete mode 100644 user_guide_src/source/DCO.rst delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/LICENSE delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/__init__.py delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/breadcrumbs.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/footer.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/layout.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/layout_old.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/pulldown.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/search.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/searchbox.html delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/css/badge_only.css delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/css/citheme.css delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/css/theme.css delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/fonts/FontAwesome.otf delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.eot delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.svg delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.ttf delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/fonts/fontawesome-webfont.woff delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/images/ci-icon.ico delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/js/oldtheme.js delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/static/js/theme.js delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/theme.conf delete mode 100644 user_guide_src/source/_themes/sphinx_rtd_theme/versions.html delete mode 100644 user_guide_src/source/changelog.rst delete mode 100644 user_guide_src/source/conf.py delete mode 100644 user_guide_src/source/contributing/index.rst delete mode 100644 user_guide_src/source/database/caching.rst delete mode 100644 user_guide_src/source/database/call_function.rst delete mode 100644 user_guide_src/source/database/configuration.rst delete mode 100644 user_guide_src/source/database/connecting.rst delete mode 100644 user_guide_src/source/database/db_driver_reference.rst delete mode 100644 user_guide_src/source/database/examples.rst delete mode 100644 user_guide_src/source/database/forge.rst delete mode 100644 user_guide_src/source/database/helpers.rst delete mode 100644 user_guide_src/source/database/index.rst delete mode 100644 user_guide_src/source/database/metadata.rst delete mode 100644 user_guide_src/source/database/queries.rst delete mode 100644 user_guide_src/source/database/query_builder.rst delete mode 100644 user_guide_src/source/database/results.rst delete mode 100644 user_guide_src/source/database/transactions.rst delete mode 100644 user_guide_src/source/database/utilities.rst delete mode 100644 user_guide_src/source/documentation/ELDocs.tmbundle.zip delete mode 100644 user_guide_src/source/documentation/index.rst delete mode 100644 user_guide_src/source/general/alternative_php.rst delete mode 100644 user_guide_src/source/general/ancillary_classes.rst delete mode 100644 user_guide_src/source/general/autoloader.rst delete mode 100644 user_guide_src/source/general/caching.rst delete mode 100644 user_guide_src/source/general/cli.rst delete mode 100644 user_guide_src/source/general/common_functions.rst delete mode 100644 user_guide_src/source/general/compatibility_functions.rst delete mode 100644 user_guide_src/source/general/controllers.rst delete mode 100644 user_guide_src/source/general/core_classes.rst delete mode 100644 user_guide_src/source/general/creating_drivers.rst delete mode 100644 user_guide_src/source/general/creating_libraries.rst delete mode 100644 user_guide_src/source/general/credits.rst delete mode 100644 user_guide_src/source/general/drivers.rst delete mode 100644 user_guide_src/source/general/environments.rst delete mode 100644 user_guide_src/source/general/errors.rst delete mode 100644 user_guide_src/source/general/helpers.rst delete mode 100644 user_guide_src/source/general/hooks.rst delete mode 100644 user_guide_src/source/general/index.rst delete mode 100644 user_guide_src/source/general/libraries.rst delete mode 100644 user_guide_src/source/general/managing_apps.rst delete mode 100644 user_guide_src/source/general/models.rst delete mode 100644 user_guide_src/source/general/profiling.rst delete mode 100644 user_guide_src/source/general/requirements.rst delete mode 100644 user_guide_src/source/general/reserved_names.rst delete mode 100644 user_guide_src/source/general/routing.rst delete mode 100644 user_guide_src/source/general/security.rst delete mode 100644 user_guide_src/source/general/styleguide.rst delete mode 100644 user_guide_src/source/general/urls.rst delete mode 100644 user_guide_src/source/general/views.rst delete mode 100644 user_guide_src/source/general/welcome.rst delete mode 100644 user_guide_src/source/helpers/array_helper.rst delete mode 100644 user_guide_src/source/helpers/captcha_helper.rst delete mode 100644 user_guide_src/source/helpers/cookie_helper.rst delete mode 100644 user_guide_src/source/helpers/date_helper.rst delete mode 100644 user_guide_src/source/helpers/directory_helper.rst delete mode 100644 user_guide_src/source/helpers/download_helper.rst delete mode 100644 user_guide_src/source/helpers/email_helper.rst delete mode 100644 user_guide_src/source/helpers/file_helper.rst delete mode 100644 user_guide_src/source/helpers/form_helper.rst delete mode 100644 user_guide_src/source/helpers/html_helper.rst delete mode 100644 user_guide_src/source/helpers/index.rst delete mode 100644 user_guide_src/source/helpers/inflector_helper.rst delete mode 100644 user_guide_src/source/helpers/language_helper.rst delete mode 100644 user_guide_src/source/helpers/number_helper.rst delete mode 100644 user_guide_src/source/helpers/path_helper.rst delete mode 100644 user_guide_src/source/helpers/security_helper.rst delete mode 100644 user_guide_src/source/helpers/smiley_helper.rst delete mode 100644 user_guide_src/source/helpers/string_helper.rst delete mode 100644 user_guide_src/source/helpers/text_helper.rst delete mode 100644 user_guide_src/source/helpers/typography_helper.rst delete mode 100644 user_guide_src/source/helpers/url_helper.rst delete mode 100644 user_guide_src/source/helpers/xml_helper.rst delete mode 100644 user_guide_src/source/images/appflowchart.gif delete mode 100644 user_guide_src/source/images/arrow.gif delete mode 100644 user_guide_src/source/images/ci-icon.ico delete mode 100644 user_guide_src/source/images/ci_logo.jpg delete mode 100644 user_guide_src/source/images/ci_logo_flame.jpg delete mode 100644 user_guide_src/source/images/file.gif delete mode 100644 user_guide_src/source/images/folder.gif delete mode 100644 user_guide_src/source/images/smile.gif delete mode 100644 user_guide_src/source/index.rst delete mode 100644 user_guide_src/source/installation/downloads.rst delete mode 100644 user_guide_src/source/installation/index.rst delete mode 100644 user_guide_src/source/installation/troubleshooting.rst delete mode 100644 user_guide_src/source/installation/upgrade_120.rst delete mode 100644 user_guide_src/source/installation/upgrade_130.rst delete mode 100644 user_guide_src/source/installation/upgrade_131.rst delete mode 100644 user_guide_src/source/installation/upgrade_132.rst delete mode 100644 user_guide_src/source/installation/upgrade_133.rst delete mode 100644 user_guide_src/source/installation/upgrade_140.rst delete mode 100644 user_guide_src/source/installation/upgrade_141.rst delete mode 100644 user_guide_src/source/installation/upgrade_150.rst delete mode 100644 user_guide_src/source/installation/upgrade_152.rst delete mode 100644 user_guide_src/source/installation/upgrade_153.rst delete mode 100644 user_guide_src/source/installation/upgrade_154.rst delete mode 100644 user_guide_src/source/installation/upgrade_160.rst delete mode 100644 user_guide_src/source/installation/upgrade_161.rst delete mode 100644 user_guide_src/source/installation/upgrade_162.rst delete mode 100644 user_guide_src/source/installation/upgrade_163.rst delete mode 100644 user_guide_src/source/installation/upgrade_170.rst delete mode 100644 user_guide_src/source/installation/upgrade_171.rst delete mode 100644 user_guide_src/source/installation/upgrade_172.rst delete mode 100644 user_guide_src/source/installation/upgrade_200.rst delete mode 100644 user_guide_src/source/installation/upgrade_201.rst delete mode 100644 user_guide_src/source/installation/upgrade_202.rst delete mode 100644 user_guide_src/source/installation/upgrade_203.rst delete mode 100644 user_guide_src/source/installation/upgrade_210.rst delete mode 100644 user_guide_src/source/installation/upgrade_211.rst delete mode 100644 user_guide_src/source/installation/upgrade_212.rst delete mode 100644 user_guide_src/source/installation/upgrade_213.rst delete mode 100644 user_guide_src/source/installation/upgrade_214.rst delete mode 100644 user_guide_src/source/installation/upgrade_220.rst delete mode 100644 user_guide_src/source/installation/upgrade_221.rst delete mode 100644 user_guide_src/source/installation/upgrade_222.rst delete mode 100644 user_guide_src/source/installation/upgrade_223.rst delete mode 100644 user_guide_src/source/installation/upgrade_300.rst delete mode 100644 user_guide_src/source/installation/upgrade_301.rst delete mode 100644 user_guide_src/source/installation/upgrade_302.rst delete mode 100644 user_guide_src/source/installation/upgrade_303.rst delete mode 100644 user_guide_src/source/installation/upgrade_304.rst delete mode 100644 user_guide_src/source/installation/upgrade_305.rst delete mode 100644 user_guide_src/source/installation/upgrade_306.rst delete mode 100644 user_guide_src/source/installation/upgrade_310.rst delete mode 100644 user_guide_src/source/installation/upgrade_311.rst delete mode 100644 user_guide_src/source/installation/upgrade_312.rst delete mode 100644 user_guide_src/source/installation/upgrade_313.rst delete mode 100644 user_guide_src/source/installation/upgrade_314.rst delete mode 100644 user_guide_src/source/installation/upgrade_315.rst delete mode 100644 user_guide_src/source/installation/upgrade_316.rst delete mode 100644 user_guide_src/source/installation/upgrade_317.rst delete mode 100644 user_guide_src/source/installation/upgrade_318.rst delete mode 100644 user_guide_src/source/installation/upgrade_b11.rst delete mode 100644 user_guide_src/source/installation/upgrading.rst delete mode 100644 user_guide_src/source/libraries/benchmark.rst delete mode 100644 user_guide_src/source/libraries/caching.rst delete mode 100644 user_guide_src/source/libraries/calendar.rst delete mode 100644 user_guide_src/source/libraries/cart.rst delete mode 100644 user_guide_src/source/libraries/config.rst delete mode 100644 user_guide_src/source/libraries/email.rst delete mode 100644 user_guide_src/source/libraries/encrypt.rst delete mode 100644 user_guide_src/source/libraries/encryption.rst delete mode 100644 user_guide_src/source/libraries/file_uploading.rst delete mode 100644 user_guide_src/source/libraries/form_validation.rst delete mode 100644 user_guide_src/source/libraries/ftp.rst delete mode 100644 user_guide_src/source/libraries/image_lib.rst delete mode 100644 user_guide_src/source/libraries/index.rst delete mode 100644 user_guide_src/source/libraries/input.rst delete mode 100644 user_guide_src/source/libraries/javascript.rst delete mode 100644 user_guide_src/source/libraries/language.rst delete mode 100644 user_guide_src/source/libraries/loader.rst delete mode 100644 user_guide_src/source/libraries/migration.rst delete mode 100644 user_guide_src/source/libraries/output.rst delete mode 100644 user_guide_src/source/libraries/pagination.rst delete mode 100644 user_guide_src/source/libraries/parser.rst delete mode 100644 user_guide_src/source/libraries/security.rst delete mode 100644 user_guide_src/source/libraries/sessions.rst delete mode 100644 user_guide_src/source/libraries/table.rst delete mode 100644 user_guide_src/source/libraries/trackback.rst delete mode 100644 user_guide_src/source/libraries/typography.rst delete mode 100644 user_guide_src/source/libraries/unit_testing.rst delete mode 100644 user_guide_src/source/libraries/uri.rst delete mode 100644 user_guide_src/source/libraries/user_agent.rst delete mode 100644 user_guide_src/source/libraries/xmlrpc.rst delete mode 100644 user_guide_src/source/libraries/zip.rst delete mode 100644 user_guide_src/source/license.rst delete mode 100644 user_guide_src/source/overview/appflow.rst delete mode 100644 user_guide_src/source/overview/at_a_glance.rst delete mode 100644 user_guide_src/source/overview/features.rst delete mode 100644 user_guide_src/source/overview/getting_started.rst delete mode 100644 user_guide_src/source/overview/goals.rst delete mode 100644 user_guide_src/source/overview/index.rst delete mode 100644 user_guide_src/source/overview/mvc.rst delete mode 100644 user_guide_src/source/tutorial/conclusion.rst delete mode 100644 user_guide_src/source/tutorial/create_news_items.rst delete mode 100644 user_guide_src/source/tutorial/index.rst delete mode 100644 user_guide_src/source/tutorial/news_section.rst delete mode 100644 user_guide_src/source/tutorial/static_pages.rst diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 88c774283..000000000 --- a/.travis.yml +++ /dev/null @@ -1,57 +0,0 @@ -language: php -dist: precise - -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - master - - hhvm - -env: - - DB=mysql - - DB=mysqli - - DB=pgsql - - DB=sqlite - - DB=pdo/mysql - - DB=pdo/pgsql - - DB=pdo/sqlite - -sudo: false - -before_script: - - sh -c "composer install --dev --no-progress" - - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS ci_test;' -U postgres; fi" - - sh -c "if [ '$DB' = 'pgsql' ] || [ '$DB' = 'pdo/pgsql' ]; then psql -c 'create database ci_test;' -U postgres; fi" - - sh -c "if [ '$DB' = 'mysql' ] || [ '$DB' = 'mysqli' ] || [ '$DB' = 'pdo/mysql' ]; then mysql -e 'create database IF NOT EXISTS ci_test;'; fi" - -script: php -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 -d mbstring.internal_encoding=UTF-8 vendor/bin/phpunit --coverage-text --configuration tests/travis/$DB.phpunit.xml - -matrix: - allow_failures: - - php: hhvm - - php: master - exclude: - - php: hhvm - env: DB=pgsql - - php: hhvm - env: DB=pdo/pgsql - - php: 7.0 - env: DB=mysql - - php: 7.1 - env: DB=mysql - - php: 7.2 - env: DB=mysql - - php: master - env: DB=mysql - -branches: - only: - - develop - - 3.0-stable - - 3.1-stable - - /^feature\/.+$/ diff --git a/DCO.txt b/DCO.txt deleted file mode 100644 index a404c0d38..000000000 --- a/DCO.txt +++ /dev/null @@ -1,25 +0,0 @@ -Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -(1) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -(2) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -(3) The contribution was provided directly to me by some other - person who certified (1), (2) or (3) and I have not modified - it. - -(4) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. diff --git a/build-release.sh b/build-release.sh deleted file mode 100755 index 6b3b31d12..000000000 --- a/build-release.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env bash - -cd $(dirname $BASH_SOURCE) - -if [ $# -eq 0 ]; then - echo 'Usage: '$BASH_SOURCE' ' - exit 1 -fi - -version_number=$1 - -if [ ${#version_number} -lt 5 ] -then - echo "Provided version number is too short" - exit 1 -elif [ ${version_number: -4} == "-dev" ] -then - echo "'-dev' releases are not allowed" - exit 1 -fi - -version_id=${version_number:0:5} -version_id=${version_id//./} -upgrade_rst='user_guide_src/source/installation/upgrade_'$version_id'.rst' - -if [ ${#version_id} -ne 3 ] -then - echo "Invalid version number format" - exit 1 -elif [ `grep -c -F --regexp="'$version_number'" system/core/CodeIgniter.php` -ne 1 ] -then - echo "Provided version number doesn't match in system/core/CodeIgniter.php" - exit 1 -elif [ `grep -c -F --regexp="'$version_number'" user_guide_src/source/conf.py` -ne 2 ] -then - echo "Provided version number doesn't match in user_guide_src/source/conf.py" - exit 1 -elif [ `grep -c -F --regexp="$version_number (Current version) " user_guide_src/source/installation/downloads.rst` -ne 1 ] -then - echo "user_guide_src/source/installation/downloads.rst doesn't appear to contain a link for this version" - exit 1 -elif [ ! -f "$upgrade_rst" ] -then - echo "${upgrade_rst} doesn't exist" - exit 1 -fi - -echo "Running tests ..." - -cd tests/ -phpunit - -if [ $? -ne 0 ] -then - echo "Build FAILED!" - exit 1 -fi - -cd .. -cd user_guide_src/ - -echo "" -echo "Building HTML docs; please check output for warnings ..." -echo "" - -make html - -echo "" - -if [ $? -ne 0 ] -then - echo "Build FAILED!" - exit 1 -fi - -echo "Building EPUB docs; please check output for warnings ..." -echo "" - -make epub - -echo "" - -if [ $? -ne 0 ] -then - echo "Build FAILED!" - exit 1 -fi - -cd .. - -if [ -d user_guide/ ] -then - rm -r user_guide/ -fi - -cp -r user_guide_src/build/html/ user_guide/ -cp user_guide_src/build/epub/CodeIgniter.epub "CodeIgniter ${version_number}.epub" - -echo "Build complete." diff --git a/phpdoc.dist.xml b/phpdoc.dist.xml deleted file mode 100644 index 6dc58c259..000000000 --- a/phpdoc.dist.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - CodeIgniter v3.0.0 API - - ./api/ - - - ./api/ - - - ./system - - - - warn - - ./api/log/{DATE}.log - ./api/{DATE}.errors.log - - - \ No newline at end of file diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php deleted file mode 100644 index b4e56bdae..000000000 --- a/tests/Bootstrap.php +++ /dev/null @@ -1,76 +0,0 @@ -= 3.5.6 - - pear channel-discover pear.phpunit.de - pear channel-discover pear.symfony.com - pear install phpunit/PHPUnit - -vfsStream - - pear channel-discover pear.bovigo.org - pear install bovigo/vfsStream-beta - -#### Installation of PEAR and PHPUnit on Ubuntu - - Installation on Ubuntu requires a few steps. Depending on your setup you may - need to use 'sudo' to install these. Mileage may vary but these steps are a - good start. - - # Install the PEAR package - sudo apt-get install php-pear - - # Add a few sources to PEAR - pear channel-discover pear.phpunit.de - pear channel-discover pear.symfony-project.com - pear channel-discover components.ez.no - pear channel-discover pear.bovigo.org - - # Finally install PHPUnit and vfsStream (including dependencies) - pear install --alldeps phpunit/PHPUnit - pear install --alldeps bovigo/vfsStream-beta - - # Finally, run 'phpunit' from within the ./tests directory - # and you should be on your way! - -## Test Suites: - -CodeIgniter bootstraps a request very directly, with very flat class -hierarchy. As a result, there is no main CodeIgniter class until the -controller is instantiated. - -This has forced the core classes to be relatively decoupled, which is -a good thing. However, it makes that portion of code relatively hard -to test. - -Right now that means we'll probably have two core test suites, along -with a base for application and package tests. That gives us: - -1. Bootstrap Test - test common.php and sanity check codeigniter.php [in planning] -2. System Test - test core components in relative isolation [in development] -3. Application Test - bootstrapping for application/tests [not started] -4. Package Test - bootstrapping for /tests [not started] - -### Test Environment: - -The test/Bootstrap.php file establishes global constants such as BASEPATH, -APPPATH, and VIEWPATH, initializing them to point to VFS locations. The -test case class employs vfsStream to make a clean virtual filesystem with -the necessary paths for every individual test. - -Within each test case, VFS directory objects are available to use as arguments -to the VFS convenience functions (see below): - -- ci_vfs_root: VFS filesystem root -- ci_app_root: Application directory -- ci_base_root: System directory -- ci_view_root: Views directory - -Classes being instantiated for testing are read from the actual filesystem -by the unit test autoloader, as are mockups created in tests/mocks. If you -need access to the real system directory, the SYSTEM_PATH constant always -points to it. - -Any other resources which need to be read from the path constants must be -created or cloned within your test. Functions for doing so are outlined -below. - -### CI_TestCase Documentation - -Test cases should extend CI_TestCase. This internally extends -PHPUnit\_Framework\_TestCase, so you have access to all of your -usual PHPUnit methods. - -We need to provide a simple way to modify the globals and the -common function output. We also need to be able to mock up -the super object as we please. - -Current API is *not stable*. Names and implementations will change. - - $this->ci_set_config($key, $val) - -Set the global config variables in a mock Config object. If key is an array, -it will replace the entire config array. They are _not_ merged. If called -without any parameters, it will create the mock object but not set any values. -The mock Config object also provides rudimentary item() and load() stubs for -delivering configured values to classes being tested and handling config load -calls, respectively. The load() stub does _not_ actually load any files, it -only records the filename provided. Check the config->loaded array to verify -calls made. - - $this->ci_instance($obj) - -Set the object to use as the "super object", in a lot -of cases this will be a simple stdClass with the attributes -you need it to have. If no parameter, will return the instance. - - $this->ci_instance_var($name, $val) - -Add an attribute to the super object. This is useful if you -set up a simple instance in setUp and then need to add different -class mockups to your super object. - - $this->ci_core_class($name) - -Get the _class name_ of a core class, so that you can instantiate -it. The variable is returned by reference and is tied to the correct -$GLOBALS key. For example: - - $cfg =& $this->ci_core_class('cfg'); // returns 'CI_Config' - $cfg = new $cfg; // instantiates config and overwrites the CFG global - - $this->ci_set_core_class($name, $obj) - -An alternative way to set one of the core globals. - - $this->ci_vfs_mkdir($name, $root) - -Creates a new directory in the test VFS. Pass a directory object to be the -parent directory or none to create a root-level directory. Returns the new -directory object. - - $this->ci_vfs_create($file, $content, $root, $path) - -Creates a new VFS file. '.php' is automatically appended to the filename if -it has no extension. Pass a directory object as the root, and an optional path -to recurse and/or create for containing the file. Path may be a string (such -as 'models/subdir') or an array (e.g. - array('models', 'subdir') ). Existing -directories in the VFS root will be recursed until a new directory is -identified - all others in the path will be created, so you can mix-and-match -old and new directories. If $file is an array (key = name, value = content), -multiple files will be created in the same path. - - $this->ci_vfs_clone($path) - -Clones an existing file from the real filesystem to exist in the same path of -the VFS. Path must be relative to the project root (i.e. - starting with -'system' or 'application'). - - $this->ci_vfs_path($path, $base) - -Creates a VFS file path string suitable for use with PHP file operations. Path -may be absolute from the VFS root, or relative to a base path. It is often -useful to use APPPATH or BASEPATH as the base. - - $this->helper($name) - -Loads a helper from the real filesystem. - - $this->lang($name) - -Loads a language file from the real filesystem and returns the $lang array. - - $this->ci_get_config() __internal__ - -Returns the global config array. Internal as you shouldn't need to -call this (you're setting it, after all). Used internally to make -CI's get_config() work. - - CI_TestCase::instance() __internal__ - -Returns an instance of the current test case. We force phpunit to -run with backup-globals enabled, so this will always be the instance -of the currently running test class. - -### Going forward - -#### 1. Bootstrap Test - -Testing common.php should be pretty simple. Include the file, and test the -functions. May require some tweaking so that we can grab the statics from all -methods (see is_loaded()). Testing the actual CodeIgniter.php file will most -likely be an output test for the default view, with some object checking after -the file runs. Needs consideration. - -#### 2. System Test - -Testing the core system relies on being able to isolate the core components -as much as possible. A few of them access other core classes as globals. These -should be mocked up and easy to manipulate. - -All functions in common.php should be a minimal implementation, or and mapped -to a method in the test's parent class to gives us full control of their output. - -#### 3. Application Test: - -Not sure yet, needs to handle: - -- Libraries -- Helpers -- Models -- MY_* files -- Controllers (uh...?) -- Views? (watir, selenium, cucumber?) -- Database Testing - -#### 4. Package Test: - -I don't have a clue how this will work. - -Needs to be able to handle packages -that are used multiple times within the application (i.e. EE/Pyro modules) -as well as packages that are used by multiple applications (library distributions) \ No newline at end of file diff --git a/tests/codeigniter/Setup_test.php b/tests/codeigniter/Setup_test.php deleted file mode 100644 index 5317c56c7..000000000 --- a/tests/codeigniter/Setup_test.php +++ /dev/null @@ -1,13 +0,0 @@ -assertTrue(defined('PROJECT_BASE')); - $this->assertTrue(defined('BASEPATH')); - $this->assertTrue(defined('APPPATH')); - $this->assertTrue(defined('VIEWPATH')); - } - -} \ No newline at end of file diff --git a/tests/codeigniter/core/Benchmark_test.php b/tests/codeigniter/core/Benchmark_test.php deleted file mode 100644 index 33bd742b2..000000000 --- a/tests/codeigniter/core/Benchmark_test.php +++ /dev/null @@ -1,67 +0,0 @@ -benchmark = new CI_Benchmark(); - } - - // -------------------------------------------------------------------- - - public function test_mark() - { - $this->assertEmpty($this->benchmark->marker); - - $this->benchmark->mark('code_start'); - - $this->assertCount(1, $this->benchmark->marker); - $this->assertArrayHasKey('code_start', $this->benchmark->marker); - } - - // -------------------------------------------------------------------- - - public function test_elapsed_time() - { - $this->assertEquals('{elapsed_time}', $this->benchmark->elapsed_time()); - $this->assertEmpty($this->benchmark->elapsed_time('undefined_point')); - - $this->benchmark->mark('code_start'); - $this->benchmark->mark('code_end'); - - // Override values, because time isn't testable, but make sure the markers were set - if (isset($this->benchmark->marker['code_start']) && is_float($this->benchmark->marker['code_start'])) - { - $this->benchmark->marker['code_start'] = 1389956144.1944; - } - - if (isset($this->benchmark->marker['code_end']) && is_float($this->benchmark->marker['code_end'])) - { - $this->benchmark->marker['code_end'] = 1389956145.1946; - } - - $this->assertEquals('1', $this->benchmark->elapsed_time('code_start', 'code_end', 0)); - $this->assertEquals('1.0', $this->benchmark->elapsed_time('code_start', 'code_end', 1)); - $this->assertEquals('1.00', $this->benchmark->elapsed_time('code_start', 'code_end', 2)); - $this->assertEquals('1.000', $this->benchmark->elapsed_time('code_start', 'code_end', 3)); - $this->assertEquals('1.0002', $this->benchmark->elapsed_time('code_start', 'code_end', 4)); - $this->assertEquals('1.0002', $this->benchmark->elapsed_time('code_start', 'code_end')); - - // Test with non-existing 2nd marker, but again - we need to override the value - $this->benchmark->elapsed_time('code_start', 'code_end2'); - if (isset($this->benchmark->marker['code_end2']) && is_float($this->benchmark->marker['code_end2'])) - { - $this->benchmark->marker['code_end2'] = 1389956146.2046; - } - - $this->assertEquals('2.0102', $this->benchmark->elapsed_time('code_start', 'code_end2')); - } - - // -------------------------------------------------------------------- - - public function test_memory_usage() - { - $this->assertEquals('{memory_usage}', $this->benchmark->memory_usage()); - } - -} diff --git a/tests/codeigniter/core/Common_test.php b/tests/codeigniter/core/Common_test.php deleted file mode 100644 index effae50c5..000000000 --- a/tests/codeigniter/core/Common_test.php +++ /dev/null @@ -1,69 +0,0 @@ -assertTrue(is_php('1.2.0')); - $this->assertFalse(is_php('9999.9.9')); - } - - // ------------------------------------------------------------------------ - - public function test_stringify_attributes() - { - $this->assertEquals(' class="foo" id="bar"', _stringify_attributes(array('class' => 'foo', 'id' => 'bar'))); - - $atts = new stdClass; - $atts->class = 'foo'; - $atts->id = 'bar'; - $this->assertEquals(' class="foo" id="bar"', _stringify_attributes($atts)); - - $atts = new stdClass; - $this->assertEquals('', _stringify_attributes($atts)); - - $this->assertEquals(' class="foo" id="bar"', _stringify_attributes('class="foo" id="bar"')); - - $this->assertEquals('', _stringify_attributes(array())); - } - - // ------------------------------------------------------------------------ - - public function test_stringify_js_attributes() - { - $this->assertEquals('width=800,height=600', _stringify_attributes(array('width' => '800', 'height' => '600'), TRUE)); - - $atts = new stdClass; - $atts->width = 800; - $atts->height = 600; - $this->assertEquals('width=800,height=600', _stringify_attributes($atts, TRUE)); - } - - // ------------------------------------------------------------------------ - - public function test_html_escape() - { - $this->assertEquals( - html_escape('Here is a string containing "quoted" text.'), - 'Here is a string containing "quoted" text.' - ); - - $this->assertEquals( - html_escape(array('associative' => 'and', array('multi' => 'dimentional'))), - array('associative' => 'and', array('multi' => 'dimentional')) - ); - } - - // ------------------------------------------------------------------------ - - public function test_remove_invisible_characters() - { - $raw_string = 'Here is a string containing invisible'.chr(0x08).' text %0e.'; - $removed_string = 'Here is a string containing invisible text %0e.'; - $this->assertEquals($removed_string, remove_invisible_characters($raw_string, FALSE)); - - $raw_string = 'Here is a string %0econtaining url_encoded invisible%1F text.'; - $removed_string = 'Here is a string containing url_encoded invisible text.'; - $this->assertEquals($removed_string, remove_invisible_characters($raw_string)); - } -} diff --git a/tests/codeigniter/core/Config_test.php b/tests/codeigniter/core/Config_test.php deleted file mode 100644 index b5c9e849d..000000000 --- a/tests/codeigniter/core/Config_test.php +++ /dev/null @@ -1,240 +0,0 @@ -ci_core_class('cfg'); - - // set predictable config values - $this->cfg = array( - 'index_page' => 'index.php', - 'base_url' => 'http://example.com/', - 'subclass_prefix' => 'MY_' - ); - $this->ci_set_config($this->cfg); - - $this->config = new $cls; - } - - // -------------------------------------------------------------------- - - public function test_item() - { - $this->assertEquals($this->cfg['base_url'], $this->config->item('base_url')); - - // Bad Config value - $this->assertNull($this->config->item('no_good_item')); - - // Index - $this->assertNull($this->config->item('no_good_item', 'bad_index')); - $this->assertNull($this->config->item('no_good_item', 'default')); - } - - // -------------------------------------------------------------------- - - public function test_set_item() - { - $this->assertNull($this->config->item('not_yet_set')); - - $this->config->set_item('not_yet_set', 'is set'); - $this->assertEquals('is set', $this->config->item('not_yet_set')); - } - - // -------------------------------------------------------------------- - - public function test_slash_item() - { - // Bad Config value - $this->assertNull($this->config->slash_item('no_good_item')); - - $this->assertEquals($this->cfg['base_url'], $this->config->slash_item('base_url')); - $this->assertEquals($this->cfg['subclass_prefix'].'/', $this->config->slash_item('subclass_prefix')); - } - - // -------------------------------------------------------------------- - - public function test_base_url() - { - // Test regular base URL - $base_url = $this->cfg['base_url']; - $this->assertEquals($base_url, $this->config->base_url()); - - // Test with URI - $uri = 'test'; - $this->assertEquals($base_url.$uri, $this->config->base_url($uri)); - - // Clear base_url - $this->ci_set_config('base_url', ''); - - // Rerun constructor - $cls =& $this->ci_core_class('cfg'); - $this->config = new $cls; - - // Test default base - $this->assertEquals('http://localhost/', $this->config->base_url()); - - // Capture server vars - $old_host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : NULL; - $old_script_name = isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : NULL; - $old_script_filename = $_SERVER['SCRIPT_FILENAME']; - $old_https = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : NULL; - $old_server_addr = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : NULL; - - // The 'Host' header is user input and must not be trusted - $_SERVER['HTTP_HOST'] = 'test.com'; - $this->config = new $cls; - $this->assertEquals('http://localhost/', $this->config->base_url()); - - // However, we may fallback to the server's IP address - $_SERVER['SERVER_ADDR'] = '127.0.0.1'; - $_SERVER['SCRIPT_NAME'] = '/base_test.php'; - $_SERVER['SCRIPT_FILENAME'] = '/foo/bar/base_test.php'; - $this->config = new $cls; - $this->assertEquals('http://127.0.0.1/', $this->config->base_url()); - - // Making sure that HTTPS and URI path are also detected - $_SERVER['HTTPS'] = 'on'; - $_SERVER['SCRIPT_NAME'] = '/path/base_test.php'; - $_SERVER['SCRIPT_FILENAME'] = '/foo/bar/path/base_test.php'; - $this->config = new $cls; - $this->assertEquals('https://127.0.0.1/path/', $this->config->base_url()); - - // Restore server vars - $_SERVER['HTTP_HOST'] = $old_host; - $_SERVER['SCRIPT_NAME'] = $old_script_name; - $_SERVER['SCRIPT_FILENAME'] = $old_script_filename; - $_SERVER['HTTPS'] = $old_https; - $_SERVER['SERVER_ADDR'] = $old_server_addr; - } - - // -------------------------------------------------------------------- - - public function test_site_url() - { - $base_url = $this->cfg['base_url']; - $index_page = $this->cfg['index_page']; - $this->assertEquals($base_url.$index_page, $this->config->site_url()); - - $old_base = $this->config->item('base_url'); - $this->config->set_item('base_url', ''); - - $q_string = $this->config->item('enable_query_strings'); - $this->config->set_item('enable_query_strings', FALSE); - - $uri = 'test'; - $uri2 = '1'; - $this->assertEquals($index_page.'/'.$uri, $this->config->site_url($uri)); - $this->assertEquals($index_page.'/'.$uri.'/'.$uri2, $this->config->site_url(array($uri, $uri2))); - - $this->assertEquals($index_page.'/test/', $this->config->site_url('test/')); - - $suffix = 'ing'; - $this->config->set_item('url_suffix', $suffix); - - $arg = 'pass'; - $this->assertEquals($index_page.'/'.$uri.$suffix, $this->config->site_url($uri)); - $this->assertEquals($index_page.'/'.$uri.$suffix.'?'.$arg, $this->config->site_url($uri.'?'.$arg)); - - $this->config->set_item('url_suffix', FALSE); - $this->config->set_item('enable_query_strings', TRUE); - - $this->assertEquals($index_page.'?'.$uri, $this->config->site_url($uri)); - $this->assertEquals($index_page.'?0='.$uri.'&1='.$uri2, $this->config->site_url(array($uri, $uri2))); - - $this->config->set_item('base_url', $old_base); - - $this->assertEquals($base_url.$index_page.'?'.$uri, $this->config->site_url($uri)); - - // back to home base - $this->config->set_item('enable_query_strings', $q_string); - } - - // -------------------------------------------------------------------- - - public function test_system_url() - { - $this->assertEquals($this->cfg['base_url'].'system/', $this->config->system_url()); - } - - // -------------------------------------------------------------------- - - public function test_load() - { - // Test regular load - $file = 'test.php'; - $key = 'testconfig'; - $val = 'my_value'; - $cfg = array($key => $val); - $this->ci_vfs_create($file, 'ci_app_root, 'config'); - $this->assertTrue($this->config->load($file)); - $this->assertEquals($val, $this->config->item($key)); - - // Test reload - value should not change - $val2 = 'new_value'; - $cfg = array($key => $val2); - $this->ci_vfs_create($file, 'ci_app_root, 'config'); - $this->assertTrue($this->config->load($file)); - $this->assertEquals($val, $this->config->item($key)); - - // Test section load - $file = 'secttest'; - $cfg = array( - 'one' => 'prime', - 'two' => 2, - 'three' => TRUE - ); - $this->ci_vfs_create($file.'.php', 'ci_app_root, 'config'); - $this->assertTrue($this->config->load($file, TRUE)); - $this->assertEquals($cfg, $this->config->item($file)); - - // Test section merge - $cfg2 = array( - 'three' => 'tres', - 'number' => 42, - 'letter' => 'Z' - ); - - $pkg_dir = 'package'; - $this->ci_vfs_create( - $file.'.php', - 'ci_app_root, - array($pkg_dir, 'config') - ); - array_unshift($this->config->_config_paths, $this->ci_vfs_path($pkg_dir.'/', APPPATH)); - $this->assertTrue($this->config->load($file, TRUE)); - $this->assertEquals(array_merge($cfg, $cfg2), $this->config->item($file)); - array_shift($this->config->_config_paths); - - // Test graceful fail of invalid file - $file = 'badfile'; - $this->ci_vfs_create($file, '', $this->ci_app_root, 'config'); - $this->assertFalse($this->config->load($file, FALSE, TRUE)); - - // Test regular fail of invalid file - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Your '.$this->ci_vfs_path('config/'.$file.'.php', APPPATH). - ' file does not appear to contain a valid configuration array.' - ); - $this->assertNull($this->config->load($file)); - } - - // -------------------------------------------------------------------- - - public function test_load_nonexistent() - { - // Test graceful fail of nonexistent file - $this->assertFalse($this->config->load('not_config_file', FALSE, TRUE)); - - // Test regular fail - $file = 'absentia'; - $this->setExpectedException( - 'RuntimeException', - 'CI Error: The configuration file '.$file.'.php does not exist.' - ); - $this->assertNull($this->config->load($file)); - } - -} \ No newline at end of file diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php deleted file mode 100644 index 976941d41..000000000 --- a/tests/codeigniter/core/Input_test.php +++ /dev/null @@ -1,281 +0,0 @@ -ci_set_config('allow_get_array', TRUE); - $this->ci_set_config('global_xss_filtering', FALSE); - $this->ci_set_config('csrf_protection', FALSE); - - $security = new Mock_Core_Security(); - - $this->ci_set_config('charset', 'UTF-8'); - $utf8 = new Mock_Core_Utf8(); - - $this->input = new Mock_Core_Input($security, $utf8); - } - - // -------------------------------------------------------------------- - - public function test_get_not_exists() - { - $this->assertSame(array(), $this->input->get()); - $this->assertNull($this->input->get('foo')); - } - - // -------------------------------------------------------------------- - - public function test_get_exist() - { - $_SERVER['REQUEST_METHOD'] = 'GET'; - $_GET['foo'] = 'bar'; - - $this->assertArrayHasKey('foo', $this->input->get()); - $this->assertEquals('bar', $this->input->get('foo')); - } - - // -------------------------------------------------------------------- - - public function test_get_exist_with_xss_clean() - { - $_SERVER['REQUEST_METHOD'] = 'GET'; - $_GET['harm'] = "Hello, i try to your site"; - - $this->assertArrayHasKey('harm', $this->input->get()); - $this->assertEquals("Hello, i try to your site", $this->input->get('harm')); - $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $this->input->get('harm', TRUE)); - } - - // -------------------------------------------------------------------- - - public function test_post_not_exists() - { - $this->assertSame(array(), $this->input->post()); - $this->assertNull($this->input->post('foo')); - } - - // -------------------------------------------------------------------- - - public function test_post_exist() - { - $_SERVER['REQUEST_METHOD'] = 'POST'; - $_POST['foo'] = 'bar'; - - $this->assertArrayHasKey('foo', $this->input->post()); - $this->assertEquals('bar', $this->input->post('foo')); - } - - // -------------------------------------------------------------------- - - public function test_post_exist_with_xss_clean() - { - $_SERVER['REQUEST_METHOD'] = 'POST'; - $_POST['harm'] = "Hello, i try to your site"; - - $this->assertArrayHasKey('harm', $this->input->post()); - $this->assertEquals("Hello, i try to your site", $this->input->post('harm')); - $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $this->input->post('harm', TRUE)); - } - - // -------------------------------------------------------------------- - - public function test_post_get() - { - $_SERVER['REQUEST_METHOD'] = 'POST'; - $_POST['foo'] = 'bar'; - - $this->assertEquals('bar', $this->input->post_get('foo')); - } - - // -------------------------------------------------------------------- - - public function test_get_post() - { - $_SERVER['REQUEST_METHOD'] = 'GET'; - $_GET['foo'] = 'bar'; - - $this->assertEquals('bar', $this->input->get_post('foo')); - } - - // -------------------------------------------------------------------- - - public function test_cookie() - { - $_COOKIE['foo'] = 'bar'; - $this->assertEquals('bar', $this->input->cookie('foo')); - $this->assertNull($this->input->cookie('bar')); - } - - // -------------------------------------------------------------------- - - public function test_server() - { - $this->assertEquals('GET', $this->input->server('REQUEST_METHOD')); - } - - // -------------------------------------------------------------------- - - public function test_fetch_from_array() - { - $data = array( - 'foo' => 'bar', - 'harm' => 'Hello, i try to your site', - ); - - $foo = $this->input->fetch_from_array($data, 'foo'); - $harm = $this->input->fetch_from_array($data, 'harm'); - $harmless = $this->input->fetch_from_array($data, 'harm', TRUE); - - $this->assertEquals('bar', $foo); - $this->assertEquals("Hello, i try to your site", $harm); - $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $harmless); - - $_SERVER['REQUEST_METHOD'] = 'POST'; - $_POST['foo']['bar'] = 'baz'; - $barArray = array('bar' => 'baz'); - - $this->assertEquals('baz', $this->input->post('foo[bar]')); - $this->assertEquals($barArray, $this->input->post('foo[]')); - $this->assertNull($this->input->post('foo[baz]')); - } - - // -------------------------------------------------------------------- - - public function test_valid_ip() - { - $this->assertTrue($this->input->valid_ip('192.18.0.1')); - $this->assertTrue($this->input->valid_ip('192.18.0.1', 'ipv4')); - $this->assertFalse($this->input->valid_ip('555.0.0.0')); - $this->assertFalse($this->input->valid_ip('2001:db8:0:85a3::ac1f:8001', 'ipv4')); - - // v6 tests - $this->assertFalse($this->input->valid_ip('192.18.0.1', 'ipv6')); - - $ip_v6 = array( - '2001:0db8:0000:85a3:0000:0000:ac1f:8001', - '2001:db8:0:85a3:0:0:ac1f:8001', - '2001:db8:0:85a3::ac1f:8001' - ); - - foreach ($ip_v6 as $ip) - { - $this->assertTrue($this->input->valid_ip($ip)); - $this->assertTrue($this->input->valid_ip($ip, 'ipv6')); - } - } - - // -------------------------------------------------------------------- - - public function test_method() - { - $_SERVER['REQUEST_METHOD'] = 'GET'; - $this->assertEquals('get', $this->input->method()); - $this->assertEquals('GET', $this->input->method(TRUE)); - $_SERVER['REQUEST_METHOD'] = 'POST'; - $this->assertEquals('post', $this->input->method()); - $this->assertEquals('POST', $this->input->method(TRUE)); - } - - // -------------------------------------------------------------------- - - public function test_is_ajax_request() - { - $this->assertFalse($this->input->is_ajax_request()); - $_SERVER['HTTP_X_REQUESTED_WITH'] = 'test'; - $this->assertFalse($this->input->is_ajax_request()); - $_SERVER['HTTP_X_REQUESTED_WITH'] = 'XMLHttpRequest'; - $this->assertTrue($this->input->is_ajax_request()); - } - - // -------------------------------------------------------------------- - - public function test_input_stream() - { - $this->markTestSkipped('TODO: Find a way to test input://'); - } - - // -------------------------------------------------------------------- - - public function test_set_cookie() - { - $this->markTestSkipped('TODO: Find a way to test HTTP headers'); - } - - // -------------------------------------------------------------------- - - public function test_get_request_header() - { - $this->markTestSkipped('TODO: Find a way to test HTTP headers'); - } - - // -------------------------------------------------------------------- - - public function test_ip_address() - { - $this->input->ip_address = '127.0.0.1'; - $this->assertEquals('127.0.0.1', $this->input->ip_address()); - - // 127.0.0.1 is set in our Bootstrap file - $this->input->ip_address = FALSE; - $this->assertEquals('127.0.0.1', $this->input->ip_address()); - - // Invalid - $_SERVER['REMOTE_ADDR'] = 'invalid_ip_address'; - $this->input->ip_address = FALSE; // reset cached value - $this->assertEquals('0.0.0.0', $this->input->ip_address()); - - $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; - - // Proxy_ips tests - $this->input->ip_address = FALSE; - $this->ci_set_config('proxy_ips', '127.0.0.3, 127.0.0.4, 127.0.0.2'); - $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.2'; - $this->assertEquals('127.0.0.1', $this->input->ip_address()); - - // Invalid spoof - $this->input->ip_address = FALSE; - $this->ci_set_config('proxy_ips', 'invalid_ip_address'); - $_SERVER['HTTP_CLIENT_IP'] = 'invalid_ip_address'; - $this->assertEquals('127.0.0.1', $this->input->ip_address()); - - $this->input->ip_address = FALSE; - $this->ci_set_config('proxy_ips', 'http://foo/bar/baz, 127.0.0.1/1'); - $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.1'; - $this->assertEquals('127.0.0.1', $this->input->ip_address()); - - $this->input->ip_address = FALSE; - $this->ci_set_config('proxy_ips', 'http://foo/bar/baz, 127.0.0.2'); - $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.2'; - $_SERVER['REMOTE_ADDR'] = '127.0.0.2'; - $this->assertEquals('127.0.0.2', $this->input->ip_address()); - - //IPv6 - $this->input->ip_address = FALSE; - $this->ci_set_config('proxy_ips', 'FE80:0000:0000:0000:0202:B3FF:FE1E:8329/1, FE80:0000:0000:0000:0202:B3FF:FE1E:8300/2'); - $_SERVER['HTTP_CLIENT_IP'] = 'FE80:0000:0000:0000:0202:B3FF:FE1E:8300'; - $_SERVER['REMOTE_ADDR'] = 'FE80:0000:0000:0000:0202:B3FF:FE1E:8329'; - $this->assertEquals('FE80:0000:0000:0000:0202:B3FF:FE1E:8300', $this->input->ip_address()); - - $this->input->ip_address = FALSE; - $this->ci_set_config('proxy_ips', '0::/32'); - $_SERVER['HTTP_CLIENT_IP'] = '127.0.0.7'; - $_SERVER['REMOTE_ADDR'] = '0000:0000:0000:0000:0000:0000:0000:0001'; - $this->assertEquals('127.0.0.7', $this->input->ip_address()); - - $this->input->ip_address = FALSE; - $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; // back to reality - } - - // -------------------------------------------------------------------- - - public function test_user_agent() - { - $_SERVER['HTTP_USER_AGENT'] = 'test'; - $this->assertEquals('test', $this->input->user_agent()); - } -} diff --git a/tests/codeigniter/core/Lang_test.php b/tests/codeigniter/core/Lang_test.php deleted file mode 100644 index 4958f42e1..000000000 --- a/tests/codeigniter/core/Lang_test.php +++ /dev/null @@ -1,101 +0,0 @@ -ci_core_class('load'); - $this->ci_instance_var('load', new $loader_cls); - $cls = $this->ci_core_class('lang'); - $this->lang = new $cls; - } - - // -------------------------------------------------------------------- - - public function test_load() - { - // Regular usage - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->assertTrue($this->lang->load('profiler', 'english')); - $this->assertEquals('URI STRING', $this->lang->language['profiler_uri_string']); - - // Already loaded file - $this->assertNull($this->lang->load('profiler', 'english')); - - // Unspecified language (defaults to english) - $this->ci_vfs_clone('system/language/english/date_lang.php'); - $this->assertTrue($this->lang->load('date')); - $this->assertEquals('Year', $this->lang->language['date_year']); - - // A language other than english - $this->ci_vfs_clone('system/language/english/email_lang.php', 'system/language/german/'); - $this->assertTrue($this->lang->load('email', 'german')); - $this->assertEquals('german', $this->lang->is_loaded['email_lang.php']); - - // Non-existent file - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' - ); - $this->lang->load('nonexistent'); - } - - // -------------------------------------------------------------------- - - public function test_non_alpha_idiom() - { - // Non-alpha idiom (should act the same as unspecified language) - // test with existing file - $this->ci_vfs_clone('system/language/english/number_lang.php'); - $this->ci_vfs_clone('system/language/english/number_lang.php', 'system/language/123funny/'); - $this->assertTrue($this->lang->load('number', '123funny')); - $this->assertEquals('Bytes', $this->lang->language['bytes']); - - // test without existing file - $this->ci_vfs_clone('system/language/english/email_lang.php'); - $this->assertTrue($this->lang->load('email', '456funny')); - $this->assertEquals('You did not specify a SMTP hostname.', $this->lang->language['email_no_hostname']); - } - - // -------------------------------------------------------------------- - - public function test_multiple_file_load() - { - // Multiple files - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $files = array( - 0 => 'profiler', - 1 => 'nonexistent' - ); - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested language file: language/english/nonexistent_lang.php' - ); - $this->lang->load($files, 'english'); - } - - // -------------------------------------------------------------------- - - public function test_alternative_path_load() - { - // Alternative Path - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->assertTrue($this->lang->load('profiler', 'english', FALSE, TRUE, 'vfs://system/')); - } - - // -------------------------------------------------------------------- - - /** - * @depends test_load - */ - public function test_line() - { - $this->ci_vfs_clone('system/language/english/profiler_lang.php'); - $this->lang->load('profiler', 'english'); - $this->assertEquals('URI STRING', $this->lang->line('profiler_uri_string')); - $this->assertFalse($this->lang->line('nonexistent_string')); - $this->assertFalse($this->lang->line(NULL)); - } -} diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php deleted file mode 100644 index 8c5bb3021..000000000 --- a/tests/codeigniter/core/Loader_test.php +++ /dev/null @@ -1,583 +0,0 @@ -ci_core_class('loader'); - $this->load = new $loader(); - - // Get CI instance - $this->ci_obj = $this->ci_instance(); - - // Set subclass prefix - $this->prefix = 'MY_'; - $this->ci_set_config('subclass_prefix', $this->prefix); - } - - // -------------------------------------------------------------------- - - public function test_library() - { - // Test getting CI_Loader object - $this->assertInstanceOf('CI_Loader', $this->load->library(NULL)); - - // Create library in VFS - $lib = 'unit_test_lib'; - $class = 'CI_'.ucfirst($lib); - $this->ci_vfs_create(ucfirst($lib), 'ci_base_root, 'libraries'); - - // Test is_loaded fail - $this->assertFalse($this->load->is_loaded(ucfirst($lib))); - - // Test loading as an array. - $this->assertInstanceOf('CI_Loader', $this->load->library(array($lib))); - $this->assertTrue(class_exists($class), $class.' does not exist'); - $this->assertAttributeInstanceOf($class, $lib, $this->ci_obj); - - // Create library in VFS - $lib = array('unit_test_lib' => 'unit_test_lib'); - - // Test loading as an array (int). - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - $this->assertTrue(class_exists($class), $class.' does not exist'); - - // Test a string given to params - $this->assertInstanceOf('CI_Loader', $this->load->library($lib, ' ')); - - // test non existent lib - $lib = 'non_existent_test_lib'; - - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested class: '.ucfirst($lib) - ); - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - } - - // -------------------------------------------------------------------- - - public function test_bad_library() - { - $lib = 'bad_test_lib'; - $this->ci_vfs_create(ucfirst($lib), '', $this->ci_app_root, 'libraries'); - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Non-existent class: '.ucfirst($lib) - ); - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - } - - // -------------------------------------------------------------------- - - public function test_library_extension() - { - // Create library and extension in VFS - $name = 'ext_test_lib'; - $lib = ucfirst($name); - $class = 'CI_'.$lib; - $ext = $this->prefix.$lib; - $this->ci_vfs_create($lib, 'ci_base_root, 'libraries'); - $this->ci_vfs_create($ext, 'ci_app_root, 'libraries'); - - // Test loading with extension - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - $this->assertTrue(class_exists($class), $class.' does not exist'); - $this->assertTrue(class_exists($ext), $ext.' does not exist'); - $this->assertAttributeInstanceOf($class, $name, $this->ci_obj); - $this->assertAttributeInstanceOf($ext, $name, $this->ci_obj); - - // Test reloading with object name - $obj = 'exttest'; - $this->assertInstanceOf('CI_Loader', $this->load->library($lib, NULL, $obj)); - $this->assertAttributeInstanceOf($class, $obj, $this->ci_obj); - $this->assertAttributeInstanceOf($ext, $obj, $this->ci_obj); - - // Test reloading - unset($this->ci_obj->$name); - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - $this->assertObjectHasAttribute($name, $this->ci_obj); - - // Create baseless library - $name = 'ext_baseless_lib'; - $lib = ucfirst($name); - $class = $this->prefix.$lib; - $this->ci_vfs_create($class, 'ci_app_root, 'libraries'); - - // Test missing base class - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested class: '.$lib - ); - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - } - - // -------------------------------------------------------------------- - - public function test_library_config() - { - // Create library in VFS - $lib = 'unit_test_config_lib'; - $class = 'CI_'.ucfirst($lib); - $content = 'config = $params; } }'; - $this->ci_vfs_create(ucfirst($lib), $content, $this->ci_base_root, 'libraries'); - - // Create config file - $cfg = array( - 'foo' => 'bar', - 'bar' => 'baz', - 'baz' => false - ); - $this->ci_vfs_create($lib, 'ci_app_root, 'config'); - - // Test object name and config - $obj = 'testy'; - $this->assertInstanceOf('CI_Loader', $this->load->library($lib, NULL, $obj)); - $this->assertTrue(class_exists($class), $class.' does not exist'); - $this->assertAttributeInstanceOf($class, $obj, $this->ci_obj); - $this->assertEquals($cfg, $this->ci_obj->$obj->config); - - // Test is_loaded - $this->assertEquals($obj, $this->load->is_loaded(ucfirst($lib))); - - // Test to load another class with the same object name - $lib = 'another_test_lib'; - $class = ucfirst($lib); - $this->ci_vfs_create(ucfirst($lib), 'ci_app_root, 'libraries'); - $this->setExpectedException( - 'RuntimeException', - "CI Error: Resource '".$obj."' already exists and is not a ".$class." instance." - ); - $this->load->library($lib, NULL, $obj); - } - - // -------------------------------------------------------------------- - - public function test_load_library_in_application_dir() - { - // Create library in VFS - $lib = 'super_test_library'; - $class = ucfirst($lib); - $this->ci_vfs_create(ucfirst($lib), 'ci_app_root, 'libraries'); - - // Load library - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - - // Was the model class instantiated. - $this->assertTrue(class_exists($class), $class.' does not exist'); - $this->assertAttributeInstanceOf($class, $lib, $this->ci_obj); - } - - // -------------------------------------------------------------------- - - public function test_driver() - { - // Call the autoloader, to include system/libraries/Driver.php - class_exists('CI_Driver_Library', TRUE); - - // Create driver in VFS - $driver = 'unit_test_driver'; - $dir = ucfirst($driver); - $class = 'CI_'.$dir; - $content = 'ci_vfs_create(ucfirst($driver), $content, $this->ci_base_root, 'libraries/'.$dir); - - // Test loading as an array. - $this->assertInstanceOf('CI_Loader', $this->load->driver(array($driver))); - $this->assertTrue(class_exists($class), $class.' does not exist'); - $this->assertAttributeInstanceOf($class, $driver, $this->ci_obj); - - // Test loading as a library with a name - $obj = 'testdrive'; - $this->assertInstanceOf('CI_Loader', $this->load->library($driver, NULL, $obj)); - $this->assertAttributeInstanceOf($class, $obj, $this->ci_obj); - - // Test a string given to params - $this->assertInstanceOf('CI_Loader', $this->load->driver($driver, ' ')); - } - - // -------------------------------------------------------------------- - - public function test_models() - { - $this->ci_set_core_class('model', 'CI_Model'); - - // Create model in VFS - $model = 'Unit_test_model'; - $content = 'ci_vfs_create($model, $content, $this->ci_app_root, 'models'); - - // Load model - $this->assertInstanceOf('CI_Loader', $this->load->model($model)); - - // Was the model class instantiated. - $this->assertTrue(class_exists($model)); - $this->assertObjectHasAttribute($model, $this->ci_obj); - - // Test no model given - $this->assertInstanceOf('CI_Loader', $this->load->model('')); - } - - // -------------------------------------------------------------------- - - public function test_model_subdir() - { - // Make sure base class is loaded - we'll test _ci_include later - $this->ci_core_class('model'); - - // Create modelin VFS - $model = 'Test_sub_model'; - $base = 'CI_Model'; - $subdir = 'cars'; - $this->ci_vfs_create($model, 'ci_app_root, - array('models', $subdir)); - - // Load model - $name = 'testors'; - $this->assertInstanceOf('CI_Loader', $this->load->model($subdir.'/'.$model, $name)); - - // Was the model class instantiated? - $this->assertTrue(class_exists($model)); - $this->assertObjectHasAttribute($name, $this->ci_obj); - $this->assertAttributeInstanceOf($base, $name, $this->ci_obj); - $this->assertAttributeInstanceOf($model, $name, $this->ci_obj); - - // Test name conflict - $obj = 'conflict'; - $this->ci_obj->$obj = new stdClass(); - $this->setExpectedException( - 'RuntimeException', - 'The model name you are loading is the name of a resource that is already being used: '.$obj - ); - $this->load->model('not_real', $obj); - } - - // -------------------------------------------------------------------- - - public function test_non_existent_model() - { - $this->setExpectedException( - 'RuntimeException', - 'Unable to locate the model you have specified: Ci_test_nonexistent_model.php' - ); - - $this->load->model('ci_test_nonexistent_model.php'); - } - - // -------------------------------------------------------------------- - - // public function testDatabase() - // { - // $this->assertInstanceOf('CI_Loader', $this->load->database()); - // $this->assertInstanceOf('CI_Loader', $this->load->dbutil()); - // } - - // -------------------------------------------------------------------- - - public function test_load_view() - { - // Create view in VFS - $view = 'unit_test_view'; - $var = 'hello'; - $value = 'World!'; - $content = 'This is my test page. '; - $this->ci_vfs_create($view, $content.'ci_app_root, 'views'); - - // Test returning view - $out = $this->load->view($view, array($var => $value), TRUE); - $this->assertEquals($content.$value, $out); - - // Mock output class - $output = $this->getMockBuilder('CI_Output')->setMethods(array('append_output'))->getMock(); - $output->expects($this->once())->method('append_output')->with($content.$value); - $this->ci_instance_var('output', $output); - - // Test view output and $vars as an object - $vars = new stdClass(); - $vars->$var = $value; - $this->assertInstanceOf('CI_Loader', $this->load->view($view, $vars)); - } - - // -------------------------------------------------------------------- - - public function test_non_existent_view() - { - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested file: ci_test_nonexistent_view.php' - ); - - $this->load->view('ci_test_nonexistent_view', array('foo' => 'bar')); - } - - // -------------------------------------------------------------------- - - public function test_file() - { - // Create view in VFS - $dir = 'views'; - $file = 'ci_test_mock_file'; - $content = 'Here is a test file, which we will load now.'; - $this->ci_vfs_create($file, $content, $this->ci_app_root, $dir); - - // Just like load->view(), take the output class out of the mix here. - $out = $this->load->file(APPPATH.$dir.'/'.$file.'.php', TRUE); - $this->assertEquals($content, $out); - - // Test non-existent file - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested file: ci_test_file_not_exists' - ); - - $this->load->file('ci_test_file_not_exists', TRUE); - } - - // -------------------------------------------------------------------- - - public function test_vars() - { - $key1 = 'foo'; - $val1 = 'bar'; - $key2 = 'boo'; - $val2 = 'hoo'; - $this->assertInstanceOf('CI_Loader', $this->load->vars(array($key1 => $val1))); - $this->assertInstanceOf('CI_Loader', $this->load->vars($key2, $val2)); - $this->assertEquals($val1, $this->load->get_var($key1)); - $this->assertEquals(array($key1 => $val1, $key2 => $val2), $this->load->get_vars()); - } - - // -------------------------------------------------------------------- - - public function test_clear_vars() - { - $key1 = 'foo'; - $val1 = 'bar'; - $key2 = 'boo'; - $val2 = 'hoo'; - $this->assertInstanceOf('CI_Loader', $this->load->vars(array($key1 => $val1))); - $this->assertInstanceOf('CI_Loader', $this->load->vars($key2, $val2)); - $this->assertEquals($val1, $this->load->get_var($key1)); - $this->assertEquals(array($key1 => $val1, $key2 => $val2), $this->load->get_vars()); - - $this->assertInstanceOf('CI_Loader', $this->load->clear_vars()); - $this->assertEquals('', $this->load->get_var($key1)); - $this->assertEquals('', $this->load->get_var($key2)); - } - - // -------------------------------------------------------------------- - - public function test_helper() - { - // Create helper in VFS - $helper = 'test'; - $func = '_my_helper_test_func'; - $content = 'ci_vfs_create($helper.'_helper', $content, $this->ci_base_root, 'helpers'); - - // Create helper extension - $exfunc = '_my_extension_func'; - $content = 'ci_vfs_create($this->prefix.$helper.'_helper', $content, $this->ci_app_root, 'helpers'); - - // Load helper - $this->assertInstanceOf('CI_Loader', $this->load->helper($helper)); - $this->assertTrue(function_exists($func), $func.' does not exist'); - $this->assertTrue(function_exists($exfunc), $exfunc.' does not exist'); - - // Create baseless extension - $ext = 'bad_ext'; - $this->ci_vfs_create($this->prefix.$ext.'_helper', '', $this->ci_app_root, 'helpers'); - - // Test bad extension - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested file: helpers/'.$ext.'_helper.php' - ); - $this->load->helper($ext); - } - - // -------------------------------------------------------------------- - - public function test_non_existent_helper() - { - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested file: helpers/bad_helper.php' - ); - $this->load->helper('bad'); - } - - // -------------------------------------------------------------------- - - public function test_loading_multiple_helpers() - { - // Create helpers in VFS - $helpers = array(); - $funcs = array(); - $files = array(); - for ($i = 1; $i <= 3; ++$i) { - $helper = 'test'.$i; - $helpers[] = $helper; - $func = '_my_helper_test_func'.$i; - $funcs[] = $func; - $files[$helper.'_helper'] = 'ci_vfs_create($files, NULL, $this->ci_base_root, 'helpers'); - - // Load helpers - $this->assertInstanceOf('CI_Loader', $this->load->helpers($helpers)); - - // Verify helper existence - foreach ($funcs as $func) { - $this->assertTrue(function_exists($func), $func.' does not exist'); - } - } - - // -------------------------------------------------------------------- - - public function test_language() - { - // Mock lang class and test load call - $file = 'test'; - $lang = $this->getMockBuilder('CI_Lang')->setMethods(array('load'))->getMock(); - $lang->expects($this->once())->method('load')->with($file); - $this->ci_instance_var('lang', $lang); - $this->assertInstanceOf('CI_Loader', $this->load->language($file)); - } - - // -------------------------------------------------------------------- - - public function test_packages() - { - // Create model in VFS package path - $dir = 'third-party'; - $lib = 'unit_test_package'; - $class = ucfirst($lib); - $this->ci_vfs_create(ucfirst($lib), 'ci_app_root, array($dir, 'libraries')); - - // Get paths - $paths = $this->load->get_package_paths(TRUE); - - // Test failed load without path - $this->setExpectedException( - 'RuntimeException', - 'CI Error: Unable to load the requested class: '.ucfirst($lib) - ); - $this->load->library($lib); - - // Add path and verify - $path = APPPATH.$dir.'/'; - $this->assertInstanceOf('CI_Loader', $this->load->add_package_path($path)); - $this->assertContains($path, $this->load->get_package_paths(TRUE)); - - // Test successful load - $this->assertInstanceOf('CI_Loader', $this->load->library($lib)); - $this->assertTrue(class_exists($class), $class.' does not exist'); - - // Add another path - $path2 = APPPATH.'another/'; - $this->assertInstanceOf('CI_Loader', $this->load->add_package_path($path2)); - $this->assertContains($path2, $this->load->get_package_paths(TRUE)); - - // Remove last path - $this->assertInstanceOf('CI_Loader', $this->load->remove_package_path()); - $this->assertNotContains($path2, $this->load->get_package_paths(TRUE)); - - // Remove path and verify restored paths - $this->assertInstanceOf('CI_Loader', $this->load->remove_package_path($path)); - $this->assertEquals($paths, $this->load->get_package_paths(TRUE)); - } - - // -------------------------------------------------------------------- - - public function test_remove_package_path() - { - $dir = 'third-party'; - $path = APPPATH.$dir.'/'; - $path2 = APPPATH.'another/'; - $paths = $this->load->get_package_paths(TRUE); - - $this->assertInstanceOf('CI_Loader', $this->load->add_package_path($path)); - $this->assertInstanceOf('CI_Loader', $this->load->remove_package_path($path)); - $this->assertEquals($paths, $this->load->get_package_paths(TRUE)); - - $this->assertInstanceOf('CI_Loader', $this->load->add_package_path($path2)); - $this->assertInstanceOf('CI_Loader', $this->load->remove_package_path()); - $this->assertNotContains($path2, $this->load->get_package_paths(TRUE)); - } - - // -------------------------------------------------------------------- - - public function test_load_config() - { - $cfg = 'someconfig'; - $this->assertTrue($this->load->config($cfg, FALSE)); - $this->assertContains($cfg, $this->ci_obj->config->loaded); - } - - // -------------------------------------------------------------------- - - public function test_initialize() - { - // Create helper in VFS - $helper = 'autohelp'; - $hlp_func = '_autohelp_test_func'; - $content = 'ci_vfs_create($helper.'_helper', $content, $this->ci_app_root, 'helpers'); - - // Create library in VFS - $lib = 'autolib'; - $lib_class = 'CI_'.ucfirst($lib); - $this->ci_vfs_create(ucfirst($lib), 'ci_base_root, 'libraries'); - - // Create driver in VFS - $drv = 'autodrv'; - $subdir = ucfirst($drv); - $drv_class = 'CI_'.$subdir; - $this->ci_vfs_create(ucfirst($drv), 'ci_base_root, array('libraries', $subdir)); - - // Create model in VFS package path - $dir = 'testdir'; - $path = APPPATH.$dir.'/'; - $model = 'Automod'; - $this->ci_vfs_create($model, 'ci_app_root, array($dir, 'models')); - - // Create autoloader config - $cfg = array( - 'packages' => array($path), - 'helper' => array($helper), - 'libraries' => array($lib), - 'drivers' => array($drv), - 'model' => array($model), - 'config' => array('config1', 'config2') - ); - $this->ci_vfs_create('autoload', 'ci_app_root, 'config'); - - $this->load->initialize(); - - // Verify path - $this->assertContains($path, $this->load->get_package_paths()); - - // Verify helper - $this->assertTrue(function_exists($hlp_func), $hlp_func.' does not exist'); - - // Verify library - $this->assertTrue(class_exists($lib_class), $lib_class.' does not exist'); - $this->assertAttributeInstanceOf($lib_class, $lib, $this->ci_obj); - - // Verify driver - $this->assertTrue(class_exists($drv_class), $drv_class.' does not exist'); - $this->assertAttributeInstanceOf($drv_class, $drv, $this->ci_obj); - - // Verify model - $this->assertTrue(class_exists($model), $model.' does not exist'); - $this->assertAttributeInstanceOf($model, $model, $this->ci_obj); - - // Verify config calls - $this->assertEquals($cfg['config'], $this->ci_obj->config->loaded); - } -} diff --git a/tests/codeigniter/core/Log_test.php b/tests/codeigniter/core/Log_test.php deleted file mode 100644 index 103af342b..000000000 --- a/tests/codeigniter/core/Log_test.php +++ /dev/null @@ -1,63 +0,0 @@ -setAccessible(TRUE); - $threshold = new ReflectionProperty('CI_Log', '_threshold'); - $threshold->setAccessible(TRUE); - $date_fmt = new ReflectionProperty('CI_Log', '_date_fmt'); - $date_fmt->setAccessible(TRUE); - $file_ext = new ReflectionProperty('CI_Log', '_file_ext'); - $file_ext->setAccessible(TRUE); - $file_perms = new ReflectionProperty('CI_Log', '_file_permissions'); - $file_perms->setAccessible(TRUE); - $enabled = new ReflectionProperty('CI_Log', '_enabled'); - $enabled->setAccessible(TRUE); - - $this->ci_set_config('log_path', '/root/'); - $this->ci_set_config('log_threshold', 'z'); - $this->ci_set_config('log_date_format', 'd.m.Y'); - $this->ci_set_config('log_file_extension', ''); - $this->ci_set_config('log_file_permissions', ''); - $instance = new CI_Log(); - - $this->assertEquals($path->getValue($instance), '/root/'); - $this->assertEquals($threshold->getValue($instance), 1); - $this->assertEquals($date_fmt->getValue($instance), 'd.m.Y'); - $this->assertEquals($file_ext->getValue($instance), 'php'); - $this->assertEquals($file_perms->getValue($instance), 0644); - $this->assertFalse($enabled->getValue($instance)); - - $this->ci_set_config('log_path', ''); - $this->ci_set_config('log_threshold', '0'); - $this->ci_set_config('log_date_format', ''); - $this->ci_set_config('log_file_extension', '.log'); - $this->ci_set_config('log_file_permissions', 0600); - $instance = new CI_Log(); - - $this->assertEquals($path->getValue($instance), APPPATH.'logs/'); - $this->assertEquals($threshold->getValue($instance), 0); - $this->assertEquals($date_fmt->getValue($instance), 'Y-m-d H:i:s'); - $this->assertEquals($file_ext->getValue($instance), 'log'); - $this->assertEquals($file_perms->getValue($instance), 0600); - $this->assertEquals($enabled->getValue($instance), TRUE); - } - - // -------------------------------------------------------------------- - - public function test_format_line() - { - $this->ci_set_config('log_path', ''); - $this->ci_set_config('log_threshold', 0); - $instance = new CI_Log(); - - $format_line = new ReflectionMethod($instance, '_format_line'); - $format_line->setAccessible(TRUE); - $this->assertEquals( - $format_line->invoke($instance, 'LEVEL', 'Timestamp', 'Message'), - "LEVEL - Timestamp --> Message\n" - ); - } -} diff --git a/tests/codeigniter/core/Model_test.php b/tests/codeigniter/core/Model_test.php deleted file mode 100644 index 80dc97b3b..000000000 --- a/tests/codeigniter/core/Model_test.php +++ /dev/null @@ -1,37 +0,0 @@ -ci_core_class('loader'); - $this->load = new $loader(); - $this->ci_obj = $this->ci_instance(); - $this->ci_set_core_class('model', 'CI_Model'); - - $model_code =<<ci_vfs_create('Test_model', $model_code, $this->ci_app_root, 'models'); - $this->load->model('test_model'); - } - - // -------------------------------------------------------------------- - - public function test__get() - { - $this->assertEquals('foo', $this->ci_obj->test_model->property); - - $this->ci_obj->controller_property = 'bar'; - $this->assertEquals('bar', $this->ci_obj->test_model->controller_property); - } - -} \ No newline at end of file diff --git a/tests/codeigniter/core/Output_test.php b/tests/codeigniter/core/Output_test.php deleted file mode 100644 index 887c077d7..000000000 --- a/tests/codeigniter/core/Output_test.php +++ /dev/null @@ -1,63 +0,0 @@ -_output_data =<< - - Basic HTML - - - Test - - -HTML; - $this->ci_set_config('charset', 'UTF-8'); - $output = $this->ci_core_class('output'); - $this->output = new $output(); - } - - // -------------------------------------------------------------------- - - public function test_set_get_append_output() - { - $append = "\n"; - - $this->assertEquals( - $this->_output_data.$append, - $this->output - ->set_output($this->_output_data) - ->append_output("\n") - ->get_output() - ); - } - - // -------------------------------------------------------------------- - - public function test_get_content_type() - { - $this->assertEquals('text/html', $this->output->get_content_type()); - } - - // -------------------------------------------------------------------- - - public function test_get_header() - { - $this->assertNull($this->output->get_header('Non-Existent-Header')); - - // TODO: Find a way to test header() values as well. Currently, - // PHPUnit prevents this by not using output buffering. - - $this->output->set_content_type('text/plain', 'WINDOWS-1251'); - $this->assertEquals( - 'text/plain; charset=WINDOWS-1251', - $this->output->get_header('content-type') - ); - } - -} diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php deleted file mode 100644 index c3113adba..000000000 --- a/tests/codeigniter/core/Security_test.php +++ /dev/null @@ -1,353 +0,0 @@ -ci_set_config('csrf_protection', TRUE); - $this->ci_set_config('csrf_token_name', 'ci_csrf_token'); - $this->ci_set_config('csrf_cookie_name', 'ci_csrf_cookie'); - - $this->security = new Mock_Core_Security(); - } - - // -------------------------------------------------------------------- - - public function test_csrf_verify() - { - $_SERVER['REQUEST_METHOD'] = 'GET'; - - $this->assertInstanceOf('CI_Security', $this->security->csrf_verify()); - } - - // -------------------------------------------------------------------- - - public function test_csrf_verify_invalid() - { - // Without issuing $_POST[csrf_token_name], this request will triggering CSRF error - $_SERVER['REQUEST_METHOD'] = 'POST'; - - $this->setExpectedException('RuntimeException', 'CI Error: The action you have requested is not allowed'); - - $this->security->csrf_verify(); - } - - // -------------------------------------------------------------------- - - public function test_csrf_verify_valid() - { - $_SERVER['REQUEST_METHOD'] = 'POST'; - $_POST[$this->security->csrf_token_name] = $this->security->csrf_hash; - - $this->assertInstanceOf('CI_Security', $this->security->csrf_verify()); - } - - // -------------------------------------------------------------------- - - public function test_get_csrf_hash() - { - $this->assertEquals($this->security->csrf_hash, $this->security->get_csrf_hash()); - } - - // -------------------------------------------------------------------- - - public function test_get_csrf_token_name() - { - $this->assertEquals('ci_csrf_token', $this->security->get_csrf_token_name()); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean() - { - $harm_string = "Hello, i try to your site"; - - $harmless_string = $this->security->xss_clean($harm_string); - - $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $harmless_string); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean_string_array() - { - $harm_strings = array( - "Hello, i try to your site", - "Simple clean string", - "Hello, i try to your site" - ); - - $harmless_strings = $this->security->xss_clean($harm_strings); - - $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $harmless_strings[0]); - $this->assertEquals("Simple clean string", $harmless_strings[1]); - $this->assertEquals("Hello, i try to [removed]alert('Hack');[removed] your site", $harmless_strings[2]); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean_image_valid() - { - $harm_string = ''; - - $xss_clean_return = $this->security->xss_clean($harm_string, TRUE); - -// $this->assertTrue($xss_clean_return); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean_image_invalid() - { - $harm_string = ''; - - $xss_clean_return = $this->security->xss_clean($harm_string, TRUE); - - $this->assertFalse($xss_clean_return); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean_entity_double_encoded() - { - $input = 'Clickhere'; - $this->assertEquals('Clickhere', $this->security->xss_clean($input)); - } - - // -------------------------------------------------------------------- - - public function text_xss_clean_js_link_removal() - { - // This one is to prevent a false positive - $this->assertEquals( - "", - $this->security->xss_clean("") - ); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean_js_img_removal() - { - $input = 'Clickhere'; - $this->assertEquals('', $this->security->xss_clean($input)); - } - - // -------------------------------------------------------------------- - - public function test_xss_clean_sanitize_naughty_html_tags() - { - $this->assertEquals('<unclosedTag', $this->security->xss_clean('assertEquals('<blink>', $this->security->xss_clean('')); - $this->assertEquals('', $this->security->xss_clean('')); - - $this->assertEquals( - ' src="x">', - $this->security->xss_clean(' src="x">') - ); - - $this->assertEquals( - 'on=">"x onerror="alert(1)">', - $this->security->xss_clean('on=">"x onerror="alert(1)">') - ); - - $this->assertEquals( - "\n><!-\n