mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
38c71c56a3
commit
261f8f897a
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user