Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 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: 634 lines (27 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: text_test  - 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.


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.


test_is_charset_supported(string $charset, bool $expected)   X-Ref
Tests the static checker is_charset_supported

param: string $charset
param: bool $expected

is_charset_supported_provider()   X-Ref
Provider for the test_is_charset_supported()

return: array[]