Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

core_text unit tests.

Copyright: 2012 Petr Skoda {@link http://skodak.org}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 484 lines (22 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: core_text_testcase  - X-Ref

Unit tests for our utf-8 aware text processing.

test_parse_charset()   X-Ref
Tests the static parse charset method.


test_convert()   X-Ref
Tests the static convert method.


test_substr()   X-Ref
Tests the static sub string method.


test_strlen()   X-Ref
Tests the static string length method.


test_str_max_bytes()   X-Ref
Test unicode safe string truncation.


test_strtolower()   X-Ref
Tests the static strtolower method.


test_strtoupper()   X-Ref
Tests the static strtoupper.


test_strrev()   X-Ref
Test the strrev method.


test_strpos()   X-Ref
Tests the static strpos method.


test_strrpos()   X-Ref
Tests the static strrpos.


test_specialtoascii()   X-Ref
Tests the static specialtoascii method.


test_encode_mimeheader()   X-Ref
Tests the static encode_mimeheader method.
This also tests method moodle_phpmailer::encodeHeader that calls core_text::encode_mimeheader


test_entities_to_utf8()   X-Ref
Tests the static entities_to_utf8 method.


test_utf8_to_entities()   X-Ref
Tests the static utf8_to_entities method.


test_trim_utf8_bom()   X-Ref
Tests the static trim_utf8_bom method.


test_remove_unicode_non_characters()   X-Ref
Tests the static remove_unicode_non_characters method.


test_get_encodings()   X-Ref
Tests the static get_encodings method.


test_code2utf8()   X-Ref
Tests the static code2utf8 method.


test_utf8ord()   X-Ref
Tests the static utf8ord method.


test_strtotitle()   X-Ref
Tests the static strtotitle method.


test_strrchr()   X-Ref
Test strrchr.