MDL-86346 core: update the use of ArrayLoader namespace

The Mustache library just got updated to version 3 recently.
The changes include update to psr-4. Hence, we update
the call to the class ArrayLoader.
This commit is contained in:
Muhammad Arnaldo
2026-01-06 08:54:45 +07:00
committed by Huong Nguyen
parent 491debdeaa
commit a1da81ae33
@@ -16,6 +16,8 @@
namespace core\output;
use Mustache\Loader\ArrayLoader;
/**
* Test escaping of Mustache template placeholders.
*
@@ -41,7 +43,7 @@ final class mustache_escape_test extends \advanced_testcase {
$engine = $reflection->invoke($renderer);
// Swap to custom loader.
$loader = new \Mustache_Loader_ArrayLoader([
$loader = new ArrayLoader([
'core/test' => '<a href="#" title="{{title}}">test</a>',
]);
$engine->setLoader($loader);
@@ -120,7 +122,7 @@ final class mustache_escape_test extends \advanced_testcase {
$engine = $reflection->invoke($renderer);
// Swap to custom loader.
$loader = new \Mustache_Loader_ArrayLoader([
$loader = new ArrayLoader([
'core/test' => 'Some {{{html}}} test',
]);
$engine->setLoader($loader);