CRM-15578 - StaticProvider, etal - Prep for unit-tests of Attachment API
[civicrm-core.git] / CRM / Core / Permission / UnitTests.php
index c083e73ec680c544d6ba75e6033312069c469c01..d4d2cb70efac9877a83378836b551fa2f1d52f1f 100644 (file)
@@ -50,6 +50,13 @@ class CRM_Core_Permission_UnitTests extends CRM_Core_Permission_Base {
    * @access public
    */
   function check($str) {
+    if ($str == CRM_Core_Permission::ALWAYS_DENY_PERMISSION) {
+      return FALSE;
+    }
+    if ($str == CRM_Core_Permission::ALWAYS_ALLOW_PERMISSION) {
+      return TRUE;
+    }
+
     // return the stubbed permission (defaulting to true if the array is missing)
     return is_array($this->permissions) ? in_array($str, $this->permissions) : TRUE;
   }