You are here

public function ConnectionsTestMocked::testThatConnectionsGetAllAddsFilters in Auth0 Single Sign On 8.2

Test a getAll request filtered by strategy.

Return value

void

Throws

\Exception Unsuccessful HTTP call.

File

vendor/auth0/auth0-php/tests/API/Management/ConnectionsMockedTest.php, line 82

Class

ConnectionsTestMocked
Class ConnectionsTestMocked.

Namespace

Auth0\Tests\API\Management

Code

public function testThatConnectionsGetAllAddsFilters() {
  $api = new MockManagementApi([
    new Response(200, self::$headers),
  ]);
  $strategy = 'test-strategy-01';
  $api
    ->call()
    ->connections()
    ->getAll($strategy);
  $this
    ->assertEquals('GET', $api
    ->getHistoryMethod());
  $this
    ->assertStringStartsWith('https://api.test.local/api/v2/connections', $api
    ->getHistoryUrl());
  $this
    ->assertContains('strategy=' . $strategy, $api
    ->getHistoryQuery());
}