You are here

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

Set the package data and make sure it's returned correctly.

Return value

void

File

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

Class

InformationHeadersTest
Class InformationHeadersTest

Namespace

Auth0\Tests\Api\Helpers

Code

public function testThatSetPackageSetsDataCorrectly() {
  $header = new InformationHeaders();
  $header
    ->setPackage('test_name', '1.2.3');
  $header_data = $header
    ->get();
  $this
    ->assertCount(2, $header_data);
  $this
    ->assertArrayHasKey('name', $header_data);
  $this
    ->assertEquals('test_name', $header_data['name']);
  $this
    ->assertArrayHasKey('version', $header_data);
  $this
    ->assertEquals('1.2.3', $header_data['version']);
}