BUGFIX Added Hierarchy::reset() to manually clear marked/expanded states triggered through Hierarchy->markExpanded() etc. This caused side effects when running e.g. CMSMainSearchFormTest and HierarchyTest alongside each other.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93987 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-30 02:24:46 +00:00
parent 38c71c56a3
commit 261f8f897a
2 changed files with 7 additions and 0 deletions

View File

@ -668,6 +668,12 @@ class Hierarchy extends DataObjectDecorator {
$this->_cache_allChildren = null;
$this->_cache_numChildren = null;
}
function reset() {
self::$marked = array();
self::$expanded = array();
self::$treeOpened = array();
}
}
?>

View File

@ -71,6 +71,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
Versioned::reset();
DataObject::reset();
SiteTree::reset();
Hierarchy::reset();
Controller::curr()->setSession(new Session(array()));
$className = get_class($this);