diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index c0c0d0955..28e874bc4 100644 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -2175,6 +2175,10 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid return $this->ParentID == 0 ? 'root' : 'subpage'; } + static function reset() { + self::$cache_permissions = array(); + } + } ?> \ No newline at end of file diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index f86038a98..eac6f8da9 100644 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -63,6 +63,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase { Translatable::reset(); Versioned::reset(); DataObject::reset(); + SiteTree::reset(); Controller::curr()->setSession(new Session(array())); $className = get_class($this);