You are here

public function ManifestTest::testCache in Progressive Web App 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/ManifestTest.php \Drupal\Tests\pwa\Functional\ManifestTest::testCache()

Test caching of manifest.json.

File

tests/src/Functional/ManifestTest.php, line 22

Class

ManifestTest
Test description.

Namespace

Drupal\Tests\pwa\Functional

Code

public function testCache() {

  // Create a test user.
  $user = $this
    ->drupalCreateUser([
    'access content',
  ]);
  $this
    ->drupalLogin($user);
  $this
    ->drupalGet('manifest.json');
  $assert = $this
    ->assertSession();
  $assert
    ->statusCodeEquals(200);
  $assert
    ->responseHeaderContains('X-Drupal-Cache-Tags', 'manifestjson');
}