ManifestTest.php in Progressive Web App 2.x
File
tests/src/Functional/ManifestTest.php
View source
<?php
namespace Drupal\Tests\pwa\Functional;
use Drupal\Tests\BrowserTestBase;
class ManifestTest extends BrowserTestBase {
public static $modules = [
'pwa',
];
public function testCache() {
$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');
}
}