Skip to content

Commit

Permalink
Merge pull request #321 from totten/snap-svc-555
Browse files Browse the repository at this point in the history
SnapshotUpgradeTest - Skip 'svc' stuff on older versions of core
  • Loading branch information
totten authored Dec 5, 2023
2 parents 73960d7 + fcc9571 commit b804e45
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/e2e/SnapshotUpgradeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit b804e45

Please sign in to comment.