Skip to content

Commit c037109

Browse files
test: handle new search event tests
1 parent 8631233 commit c037109

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

test/FingerprintApiTest.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,16 +844,26 @@ public function testSearchEventsWithAllParams()
844844
'min_suspect_score' => '0.5',
845845
'ip_blocklist' => 'true',
846846
'datacenter' => 'true',
847+
'developer_tools' => 'true',
848+
'location_spoofing' => 'true',
849+
'mitm_attack' => 'true',
850+
'proxy' => 'true',
851+
'sdk_version' => 'testSdkVersion',
852+
'sdk_platform' => 'testSdkPlatform',
847853
];
848854

849855
$extraKeys = ['ii', 'visitor_id'];
850856

851-
$this->assertCount(count($expected) + count($extraKeys), $queryArray);
857+
// Plus 1 for environment query
858+
$this->assertCount(count($expected) + count($extraKeys) + 1, $queryArray);
852859
foreach ($expected as $query => $value) {
853860
$this->assertArrayHasKey($query, $queryArray, "Missing query parameter: $query");
854861
$this->assertEquals($value, $queryArray[$query]);
855862
}
856863

864+
$envs = $queryArray['environment'];
865+
$this->assertEquals(['env1', 'env2'], $envs);
866+
857867
return $this->returnMockResponse('get_event_search_200.json');
858868
});
859869

@@ -884,6 +894,13 @@ public function testSearchEventsWithAllParams()
884894
min_suspect_score: 0.5,
885895
ip_blocklist: true,
886896
datacenter: true,
897+
developer_tools: true,
898+
location_spoofing: true,
899+
mitm_attack: true,
900+
proxy: true,
901+
sdk_version: 'testSdkVersion',
902+
sdk_platform: 'testSdkPlatform',
903+
environment: ['env1', 'env2']
887904
);
888905

889906
$this->assertCount(1, $events->getEvents());

0 commit comments

Comments
 (0)