Skip to content

Commit

Permalink
Add tests for new API method
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Apr 30, 2024
1 parent ada168c commit 34b64b9
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions plugins/Live/tests/System/ApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,9 @@ public function testApi($api, $params)

public function getApiForTesting()
{
$api = [
'Live.getVisitorProfile',
];

$apiToTest = [];
$apiToTest[] = [
$api,
['Live.getVisitorProfile'],
[
'idSite' => 1,
'date' => self::$fixture->dateTime,
Expand All @@ -56,7 +52,7 @@ public function getApiForTesting()
],
];
$apiToTest[] = [
$api,
['Live.getVisitorProfile'],
[
'idSite' => 1,
'date' => self::$fixture->dateTime,
Expand Down Expand Up @@ -151,6 +147,14 @@ public function getApiForTesting()
'testSuffix' => 'hideColumnsNonRecursive',
],
];
$apiToTest[] = [
['Live.getMostRecentVisitsDateTime'],
[
'idSite' => 1,
'date' => self::$fixture->dateTime,
'periods' => ['day'],
],
];

return $apiToTest;
}
Expand Down

0 comments on commit 34b64b9

Please sign in to comment.