From 47cb51360d2583b41df56684a2f9118447c4d6e5 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Thu, 25 Feb 2021 14:44:26 +1300 Subject: [PATCH] FIX Extend Page instead of SiteTree so that this works with GraphQL3 --- code/multitab-validation/MultiTabPage.php | 8 ++++++-- code/multitab-validation/SingleTabPage.php | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/code/multitab-validation/MultiTabPage.php b/code/multitab-validation/MultiTabPage.php index 4037993..09f493f 100644 --- a/code/multitab-validation/MultiTabPage.php +++ b/code/multitab-validation/MultiTabPage.php @@ -2,14 +2,18 @@ namespace SilverStripe\FrameworkTest\Model; -use SilverStripe\CMS\Model\SiteTree; +use Page; use SilverStripe\Forms\RequiredFields; use SilverStripe\Forms\TextField; +if (!class_exists(Page::class)) { + return; +} + /** * This class is specifically for the silverstripe/admin behat test multitab-validation.feature */ -class MultiTabPage extends SiteTree +class MultiTabPage extends Page { private static $db = [ 'SecondTabFirstField' => 'Varchar(50)', diff --git a/code/multitab-validation/SingleTabPage.php b/code/multitab-validation/SingleTabPage.php index 574f30f..c79aa43 100644 --- a/code/multitab-validation/SingleTabPage.php +++ b/code/multitab-validation/SingleTabPage.php @@ -2,13 +2,17 @@ namespace SilverStripe\FrameworkTest\Model; -use SilverStripe\CMS\Model\SiteTree; +use Page; use SilverStripe\Forms\RequiredFields; +if (!class_exists(Page::class)) { + return; +} + /** * This class is specifically for the silverstripe/admin behat test multitab-validation.feature */ -class SingleTabPage extends SiteTree +class SingleTabPage extends Page { public function getCMSValidator() {