MDL-66903 core: Check PHPUNIT_TEST defined before using

This commit is contained in:
Andrew Nicols
2024-07-15 13:42:10 +07:00
committed by Huong Nguyen
parent 8a66b2b99a
commit 70ab78478f
+1 -1
View File
@@ -155,7 +155,7 @@ class core_component {
return;
}
if (PHPUNIT_TEST) {
if (defined('PHPUNIT_TEST') && PHPUNIT_TEST) {
// For unit tests we support classes in `\frankenstyle_component\tests\` to be loaded from
// `path/to/frankenstyle/component/tests/classes` directory.
// Note: We do *not* support the legacy `\frankenstyle_component_tests_style_classnames`.