From 55c5d1cab725ea7d0d2b9f35e4c7c92738bd147d Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 4 Oct 2010 04:51:08 +0000 Subject: [PATCH] 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 --- dev/SapphireTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index 5f9ae8ef1..d55da7fed 100755 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -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); }