Skip to content

Commit 8f452a6

Browse files
committed
fix test
1 parent d4f3f9d commit 8f452a6

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

tests/System/ApiTest.php

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,19 @@ public function getApiForTesting()
172172
);
173173
}
174174

175-
$apiToTest[] = array(array('API.getSegmentsMetadata'),
176-
array(
177-
'idSite' => 1,
178-
'date' => self::$fixture->dateTime,
179-
'periods' => array('year'),
180-
'otherRequestParameters' => [
181-
'hideColumns' => 'acceptedValues' // hide accepted values as they might change
182-
]
183-
)
184-
);
175+
// some segments were added in 3.13.0
176+
if (version_compare(Version::VERSION, '3.13.0', '>=')) {
177+
$apiToTest[] = array(array('API.getSegmentsMetadata'),
178+
array(
179+
'idSite' => 1,
180+
'date' => self::$fixture->dateTime,
181+
'periods' => array('year'),
182+
'otherRequestParameters' => [
183+
'hideColumns' => 'acceptedValues' // hide accepted values as they might change
184+
]
185+
)
186+
);
187+
}
185188

186189
$apiToTest[] = array(array('API.getProcessedReport'),
187190
array(

0 commit comments

Comments
 (0)