API CHANGE: Allow on_db_reset() methods on DataObjects as well as DataObjectDecortators (from r101119)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111593 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-04 04:51:08 +00:00
parent bfc354ab7e
commit 55c5d1cab7

View File

@ -615,7 +615,7 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
// Some DataObjectsDecorators keep a static cache of information that needs to
// be reset whenever the database is cleaned out
foreach(ClassInfo::subclassesFor('DataObjectDecorator') as $class) {
foreach(array_merge(ClassInfo::subclassesFor('DataObjectDecorator'), ClassInfo::subclassesFor('DataObject')) as $class) {
$toCall = array($class, 'on_db_reset');
if(is_callable($toCall)) call_user_func($toCall);
}