From fcc9571941882e692c3360d19bfc6fa46d0c551a Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 5 Dec 2023 14:08:44 +0000 Subject: [PATCH] SnapshotUpgradeTest - Skip 'svc' stuff on older versions of core --- tests/e2e/SnapshotUpgradeTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/e2e/SnapshotUpgradeTest.php b/tests/e2e/SnapshotUpgradeTest.php index b824dfac..1567cd43 100644 --- a/tests/e2e/SnapshotUpgradeTest.php +++ b/tests/e2e/SnapshotUpgradeTest.php @@ -169,6 +169,12 @@ public function checkSnapshot_qf(): void { public function checkSnapshot_svc(): void { $this->runsIf($this->isScenario('svc') || $this->isKitchenSinkWith('Civi/Civixsnapshot/Some/Thing.php')); + $getSystem = PH::runOK('cv api3 System.get --out=json'); + $system = json_decode($getSystem->getOutput(), TRUE); + if (!version_compare($system['values'][0]['version'], '5.55', '>=')) { + return; + } + $getServices = PH::runOK("cv service some.thing --out=json"); $parsed = json_decode($getServices->getOutput(), TRUE); $this->assertEquals('some.thing', $parsed[0]['service'], 'Expected to find service name');