You are here

public function ContainerRebuildWebTest::testSetContainerRebuildWithDifferentDeploymentIdentifier in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php \Drupal\Tests\system\Functional\DrupalKernel\ContainerRebuildWebTest::testSetContainerRebuildWithDifferentDeploymentIdentifier()
  2. 9 core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php \Drupal\Tests\system\Functional\DrupalKernel\ContainerRebuildWebTest::testSetContainerRebuildWithDifferentDeploymentIdentifier()

Sets a different deployment identifier.

File

core/modules/system/tests/src/Functional/DrupalKernel/ContainerRebuildWebTest.php, line 27

Class

ContainerRebuildWebTest
Ensures that the container rebuild works as expected.

Namespace

Drupal\Tests\system\Functional\DrupalKernel

Code

public function testSetContainerRebuildWithDifferentDeploymentIdentifier() {
  $assert = $this
    ->assertSession();

  // Ensure the parameter is not set.
  $this
    ->drupalGet('<front>');
  $assert
    ->responseHeaderEquals('container_rebuild_indicator', NULL);
  $this
    ->writeSettings([
    'settings' => [
      'deployment_identifier' => (object) [
        'value' => 'new-identifier',
        'required' => TRUE,
      ],
    ],
  ]);
  $this
    ->drupalGet('<front>');
  $assert
    ->responseHeaderEquals('container_rebuild_indicator', 'new-identifier');
}