]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Added unit tests for entities.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 2 Oct 2009 21:59:45 +0000 (21:59 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 2 Oct 2009 21:59:45 +0000 (21:59 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3505 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/entities.php

index 7e3dcb62893663bee630158ce4e7de06c64d3aa6..a73dde60c7c3abc1e7330752f64c5a858a0c5b70 100644 (file)
                }
        }
        
+       /**
+        * Runs unit tests for the entities object. 
+        */
+       function entities_test($hook, $type, $value, $params) {
+               global $CONFIG;
+               $params[] = $CONFIG->path . 'engine/tests/entities.php';
+               return $params;
+       }
+       
        /**
         * Entities init function; establishes the page handler
         *
        {
                register_page_handler('view','entities_page_handler');
                
+               register_plugin_hook('unit_test', 'system', 'entities_test'); 
+               
                // Allow a permission override for recursive entity deletion
                // TODO: Can this be done better?
                register_plugin_hook('permissions_check','all','recursive_delete_permissions_check');