diff --git a/tests/php/Extension/Engine/SiteTreePublishingEngineTest.php b/tests/php/Extension/Engine/SiteTreePublishingEngineTest.php index 32a52e0..f6a4281 100644 --- a/tests/php/Extension/Engine/SiteTreePublishingEngineTest.php +++ b/tests/php/Extension/Engine/SiteTreePublishingEngineTest.php @@ -26,6 +26,10 @@ class SiteTreePublishingEngineTest extends SapphireTest { protected static $fixture_file = 'SiteTreePublishingEngineTest.yml'; + protected static $extra_dataobjects = [ + DataObjectNoTrigger::class, + ]; + protected static $required_extensions = [ SiteTree::class => [ PublishableSiteTree::class, @@ -246,7 +250,8 @@ public function testStaticPublishingTriggerOnExtension(): void /** @var QueuedJobsTestService $service */ $service = QueuedJobService::singleton(); - $dataObject = DataObjectNoTrigger::create()->write(); + $dataObject = DataObjectNoTrigger::create(); + $dataObject->write(); $dataObject->publishRecursive(); $jobs = $service->getJobs(); diff --git a/tests/php/StaticPublisherTest/Model/DataObjectNoTrigger.php b/tests/php/StaticPublisherTest/Model/DataObjectNoTrigger.php index fa7021e..a1dddbc 100644 --- a/tests/php/StaticPublisherTest/Model/DataObjectNoTrigger.php +++ b/tests/php/StaticPublisherTest/Model/DataObjectNoTrigger.php @@ -7,9 +7,10 @@ class DataObjectNoTrigger extends DataObject implements TestOnly { + private static $table_name = 'StaticPublishQueue_DataObjectNoTrigger'; + public function AbsoluteLink() { return 'http://example.com/subpage/dataobject-1'; } } - diff --git a/tests/php/StaticPublisherTest/Model/ExtensionAddsTrigger.php b/tests/php/StaticPublisherTest/Model/ExtensionAddsTrigger.php index d0bd7c2..f8de405 100644 --- a/tests/php/StaticPublisherTest/Model/ExtensionAddsTrigger.php +++ b/tests/php/StaticPublisherTest/Model/ExtensionAddsTrigger.php @@ -24,4 +24,3 @@ public function objectsToDelete($context) return []; } } -