You are here

public function InformationHeadersTest::testThatCorePackageIsSet in Auth0 Single Sign On 8.2

Check that setting the core package works correctly.

Return value

void

File

vendor/auth0/auth0-php/tests/API/Helpers/InformationHeadersTest.php, line 110

Class

InformationHeadersTest
Class InformationHeadersTest

Namespace

Auth0\Tests\Api\Helpers

Code

public function testThatCorePackageIsSet() {
  $header = new InformationHeaders();
  $header
    ->setCorePackage();
  $header_data = $header
    ->get();
  $this
    ->assertArrayHasKey('name', $header_data);
  $this
    ->assertArrayHasKey('version', $header_data);
  $this
    ->assertArrayHasKey('env', $header_data);
  $this
    ->assertArrayHasKey('php', $header_data['env']);
  $this
    ->assertEquals('auth0-php', $header_data['name']);
  $this
    ->assertEquals(ApiClient::API_VERSION, $header_data['version']);
  $this
    ->assertEquals(phpversion(), $header_data['env']['php']);
}