MDL-81920 lang: move language string class into autoload namespace.

This commit is contained in:
Paul Holden 2024-05-17 00:18:31 +01:00
parent ad7fc69c25
commit cc30087d84
No known key found for this signature in database
GPG key ID: A81A96D6045F6164
5 changed files with 291 additions and 257 deletions

View file

@ -16,8 +16,6 @@
namespace core;
use lang_string;
/**
* Unit tests for (some of) ../moodlelib.php.
*
@ -2115,13 +2113,13 @@ class moodlelib_test extends \advanced_testcase {
$leadingbackslash = (version_compare(PHP_VERSION, '8.2.0', '>=')) ? '\\' : '';
$expected1 = <<<EOF
{$leadingbackslash}lang_string::__set_state(array(
'identifier' => 'no',
{$leadingbackslash}core\lang_string::__set_state(array(
'component' => 'moodle',
'a' => NULL,
'lang' => NULL,
'string' => NULL,
'forcedstring' => false,
'identifier' => 'no',
'lang' => NULL,
))
EOF;
@ -4656,7 +4654,7 @@ EOT;
],
'method_of_object' => [
[new lang_string('parentlanguage', 'core_langconfig'), 'my_foobar_method'],
'lang_string::my_foobar_method',
'core\lang_string::my_foobar_method',
],
'function_as_literal' => [
'my_foobar_callback',