MDL-47564 Availability: incorrect use of defined('PHP_UNIT')
authorsam marshall <s.marshall@open.ac.uk>
Tue, 7 Oct 2014 13:47:29 +0000 (14:47 +0100)
committersam marshall <s.marshall@open.ac.uk>
Tue, 7 Oct 2014 13:47:29 +0000 (14:47 +0100)
availability/classes/tree.php

index 658ed5f..e6383ed 100644 (file)
@@ -198,7 +198,7 @@ class tree extends tree_node {
 
         // For unit tests, also allow the mock plugin type (even though it
         // isn't configured in the code as a proper plugin).
-        if (defined('PHPUNIT_TEST')) {
+        if (PHPUNIT_TEST) {
             $enabled['mock'] = true;
         }