You are here

public function RequestBuilderTest::testFullUrl in Auth0 Single Sign On 8.2

File

vendor/auth0/auth0-php/tests/API/Helpers/RequestBuilderTest.php, line 154

Class

RequestBuilderTest
Class RequestBuilderTest Tests the Auth0\SDK\API\Helpers\RequestBuilder class.

Namespace

Auth0\Tests\API

Code

public function testFullUrl() {
  $builder = self::getUrlBuilder('/api');
  $builder
    ->addPath('path', 2)
    ->addPath('subpath')
    ->withParams([
    [
      'key' => 'param1',
      'value' => 'value1',
    ],
    [
      'key' => 'param2',
      'value' => 'value2',
    ],
  ]);
  $this
    ->assertEquals('path/2/subpath?param1=value1&param2=value2', $builder
    ->getUrl());
}