You are here

ManifestTest.php in Progressive Web App 2.x

Same filename and directory in other branches
  1. 8 tests/src/Functional/ManifestTest.php

File

tests/src/Functional/ManifestTest.php
View source
<?php

namespace Drupal\Tests\pwa\Functional;

use Drupal\Tests\BrowserTestBase;

/**
 * Test description.
 *
 * @group pwa
 */
class ManifestTest extends BrowserTestBase {

  /**
   * {@inheritdoc}
   */
  public static $modules = [
    'pwa',
  ];

  /**
   * Test caching of manifest.json.
   */
  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');
  }

}

Classes

Namesort descending Description
ManifestTest Test description.