You are here

public function ResponseTest::testGeneratorStringAndHeader in Commerce Core 8.2

Test to see if the "x-commerce-core" header is added.

File

tests/src/Functional/ResponseTest.php, line 15

Class

ResponseTest
Tests to see if the "x-commerce-core" header is added.

Namespace

Drupal\Tests\commerce\Functional

Code

public function testGeneratorStringAndHeader() {
  $this
    ->drupalGet('<front>');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  list($version) = explode('.', \Drupal::VERSION, 2);
  $this
    ->assertSession()
    ->responseContains('Drupal ' . $version . ' (https://www.drupal.org); Commerce 2');
  $this
    ->assertEquals('2', $this
    ->drupalGetHeader('X-Commerce-Core'));
}