@@ -205,7 +205,10 @@ public function testThatGetAllUsersRequestIsFormattedProperly()
205205 $ api ->call ()->users ()->getAll ();
206206
207207 $ this ->assertEquals ( 'GET ' , $ api ->getHistoryMethod () );
208- $ this ->assertEquals ( 'https://api.test.local/api/v2/users ' , $ api ->getHistoryUrl () );
208+ $ this ->assertStringStartsWith ( 'https://api.test.local/api/v2/users ' , $ api ->getHistoryUrl () );
209+
210+ $ query = '& ' .$ api ->getHistoryQuery ();
211+ $ this ->assertStringContainsString ( '&include_totals=false ' , $ query );
209212
210213 $ headers = $ api ->getHistoryHeaders ();
211214 $ this ->assertEquals ( 'Bearer __api_token__ ' , $ headers ['Authorization ' ][0 ] );
@@ -225,8 +228,8 @@ public function testThatGetAllUsersAdditionalParamsAreSent()
225228
226229 $ api ->call ()->users ()->getAll ( [ '__test_parameter__ ' => '__test_value__ ' ] );
227230
228- $ query = $ api ->getHistoryQuery ();
229- $ this ->assertEquals ( '__test_parameter__=__test_value__ ' , $ query );
231+ $ query = ' & ' . $ api ->getHistoryQuery ();
232+ $ this ->assertStringContainsString ( '& __test_parameter__=__test_value__ ' , $ query );
230233 }
231234
232235 /**
@@ -242,8 +245,8 @@ public function testThatGetAllUsersFieldsParamDoesNotOverwrite()
242245
243246 $ api ->call ()->users ()->getAll ( [ 'fields ' => 'field1,field2 ' ], 'field3 ' );
244247
245- $ query = $ api ->getHistoryQuery ();
246- $ this ->assertEquals ( 'fields=field1,field2 ' , $ query );
248+ $ query = ' & ' . $ api ->getHistoryQuery ();
249+ $ this ->assertStringContainsString ( '& fields=field1,field2 ' , $ query );
247250 }
248251
249252 /**
@@ -262,13 +265,13 @@ public function testThatGetAllUsersFieldsAreFormattedCorrectly()
262265
263266 $ api ->call ()->users ()->getAll ( [ 'fields ' => 'field1,field2 ' ] );
264267
265- $ query = $ api ->getHistoryQuery ();
266- $ this ->assertEquals ( 'fields=field1,field2 ' , $ query );
268+ $ query = ' & ' . $ api ->getHistoryQuery ();
269+ $ this ->assertStringContainsString ( '& fields=field1,field2 ' , $ query );
267270
268271 $ api ->call ()->users ()->getAll ( [ 'fields ' => [ 'field1 ' , 'field2 ' ] ] );
269272
270- $ query = $ api ->getHistoryQuery ();
271- $ this ->assertEquals ( 'fields=field1,field2 ' , $ query );
273+ $ query = ' & ' . $ api ->getHistoryQuery ();
274+ $ this ->assertStringContainsString ( '& fields=field1,field2 ' , $ query );
272275 }
273276
274277 /**
0 commit comments