You are here

public function EdgescapeTest::testGetInformationByTypeReturnsValues in Akamai 8.3

Tests getInformationByType returns values.

File

tests/src/Unit/Helper/EdgescapeTest.php, line 101

Class

EdgescapeTest
Edgescape Helper Tests.

Namespace

Drupal\Tests\akamai\Unit\Helper

Code

public function testGetInformationByTypeReturnsValues() {

  // Config true and header present.
  $config = $this
    ->getConfigFactory(TRUE);
  $requestStack = $this
    ->getRequestStack($this
    ->getEdgescapeHeaderValue());
  $helper = new Edgescape($config, $requestStack);
  $this
    ->assertSame($helper
    ->getInformationByType('country_code'), 'US');
  $this
    ->assertSame($helper
    ->getInformationByType('continent'), 'NA');
  $this
    ->assertSame($helper
    ->getInformationByType('foo'), '');
}