You are here

public function UsersMockedTest::testThatGetAllUsersIncludeFieldsIsNotOverwritten in Auth0 Single Sign On 8.2

Test that the include_fields value passed in the extra params is not overwritten by the function param.

Return value

void

Throws

\Exception Should not be thrown in this test.

File

vendor/auth0/auth0-php/tests/API/Management/UsersMockedTest.php, line 310

Class

UsersMockedTest
Class UsersMockedTest.

Namespace

Auth0\Tests\API\Management

Code

public function testThatGetAllUsersIncludeFieldsIsNotOverwritten() {
  $api = new MockManagementApi([
    new Response(200, self::$headers),
  ]);
  $api
    ->call()
    ->users()
    ->getAll([
    'include_fields' => false,
  ], [
    'field3',
  ], true);
  $query = $api
    ->getHistoryQuery();
  $this
    ->assertContains('fields=field3', $query);
  $this
    ->assertContains('include_fields=false', $query);
}