From 7fff17b317a78a3ea638bd2fbfad5f8be6bedb5b Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Thu, 14 Sep 2017 10:28:29 +1200 Subject: [PATCH] Correct extra dataobjects array name --- tests/CommentingControllerTest.php | 4 ++-- tests/CommentsExtensionTest.php | 2 +- tests/CommentsTest.php | 2 +- tests/Stubs/CommentableItem.php | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/CommentingControllerTest.php b/tests/CommentingControllerTest.php index 62f837a..24cf3b7 100644 --- a/tests/CommentingControllerTest.php +++ b/tests/CommentingControllerTest.php @@ -29,9 +29,9 @@ class CommentingControllerTest extends FunctionalTest /** * {@inheritDoc} */ - protected $extraDataObjects = array( + protected static $extra_dataobjects = [ CommentableItem::class - ); + ]; protected $securityEnabled; diff --git a/tests/CommentsExtensionTest.php b/tests/CommentsExtensionTest.php index e4e8bee..72eda31 100644 --- a/tests/CommentsExtensionTest.php +++ b/tests/CommentsExtensionTest.php @@ -23,7 +23,7 @@ class CommentsExtensionTest extends SapphireTest /** * {@inheritDoc} */ - protected $extraDataObjects = array( + protected static $extra_dataobjects = array( CommentableItem::class, CommentableItemEnabled::class, CommentableItemDisabled::class diff --git a/tests/CommentsTest.php b/tests/CommentsTest.php index df53e9b..e05e85a 100644 --- a/tests/CommentsTest.php +++ b/tests/CommentsTest.php @@ -26,7 +26,7 @@ class CommentsTest extends FunctionalTest { protected static $fixture_file = 'comments/tests/CommentsTest.yml'; - protected $extraDataObjects = array( + protected static $extra_dataobjects = array( CommentableItem::class, CommentableItemEnabled::class, CommentableItemDisabled::class diff --git a/tests/Stubs/CommentableItem.php b/tests/Stubs/CommentableItem.php index 79cdaac..afe923e 100644 --- a/tests/Stubs/CommentableItem.php +++ b/tests/Stubs/CommentableItem.php @@ -23,6 +23,8 @@ class CommentableItem extends DataObject implements TestOnly CommentsExtension::class ); + private static $table_name = 'CommentableItem'; + public function RelativeLink() { return 'CommentableItemController';