Commit 2b7d2e1e authored by catch's avatar catch
Browse files

Issue #3139437 by pavnish, mrinalini9, mondrake, longwave, Bunty Badgujar:...

Issue #3139437 by pavnish, mrinalini9, mondrake, longwave, Bunty Badgujar: Replace usages of AssertLegacyTrait::assertCacheTag, that is deprecated
parent 0073e148
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ public function testCacheTagInvalidationUponInstallation() {
    // Check the same page, block.module's hook_install() should have
    // invalidated the 'rendered' cache tag to make blocks show up.
    $this->drupalGet('');
    $this->assertCacheTag('config:block_list');
    $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'config:block_list');
    $this->assertText('Powered by Drupal');
  }

+5 −5
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ public function testSystemBrandingSettings() {
    $this->assertTrue(!empty($site_logo_element), 'The branding block logo was found.');
    $this->assertTrue(!empty($site_name_element), 'The branding block site name was found.');
    $this->assertTrue(!empty($site_slogan_element), 'The branding block slogan was found.');
    $this->assertCacheTag('config:system.site');
    $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'config:system.site');

    // Be sure the slogan is XSS-filtered.
    $this->config('system.site')
@@ -73,7 +73,7 @@ public function testSystemBrandingSettings() {
    $this->assertTrue(empty($site_logo_element), 'The branding block logo was disabled.');
    $this->assertTrue(!empty($site_name_element), 'The branding block site name was found.');
    $this->assertTrue(!empty($site_slogan_element), 'The branding block slogan was found.');
    $this->assertCacheTag('config:system.site');
    $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'config:system.site');

    // Turn just the site name off.
    $this->config('block.block.site-branding')
@@ -88,7 +88,7 @@ public function testSystemBrandingSettings() {
    $this->assertTrue(!empty($site_logo_element), 'The branding block logo was found.');
    $this->assertTrue(empty($site_name_element), 'The branding block site name was disabled.');
    $this->assertTrue(!empty($site_slogan_element), 'The branding block slogan was found.');
    $this->assertCacheTag('config:system.site');
    $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'config:system.site');

    // Turn just the site slogan off.
    $this->config('block.block.site-branding')
@@ -103,7 +103,7 @@ public function testSystemBrandingSettings() {
    $this->assertTrue(!empty($site_logo_element), 'The branding block logo was found.');
    $this->assertTrue(!empty($site_name_element), 'The branding block site name was found.');
    $this->assertTrue(empty($site_slogan_element), 'The branding block slogan was disabled.');
    $this->assertCacheTag('config:system.site');
    $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'config:system.site');

    // Turn the site name and the site slogan off.
    $this->config('block.block.site-branding')
@@ -118,7 +118,7 @@ public function testSystemBrandingSettings() {
    $this->assertTrue(!empty($site_logo_element), 'The branding block logo was found.');
    $this->assertTrue(empty($site_name_element), 'The branding block site name was disabled.');
    $this->assertTrue(empty($site_slogan_element), 'The branding block slogan was disabled.');
    $this->assertCacheTag('config:system.site');
    $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'config:system.site');
  }

}
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ public function testBook() {

    // Check the presence of expected cache tags.
    $this->drupalGet('node/add/book');
    $this->assertCacheTag('config:book.settings');
    $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'config:book.settings');

    /*
     * Add Node 5 under Node 3.
+2 −2
Original line number Diff line number Diff line
@@ -96,8 +96,8 @@ public function testAnonymous() {
    $this->assertTrue($this->commentContactInfoAvailable(), 'Contact information available.');

    // Check the presence of expected cache tags.
    $this->assertCacheTag('config:field.field.node.article.comment');
    $this->assertCacheTag('config:user.settings');
    $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'config:field.field.node.article.comment');
    $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'config:user.settings');

    $anonymous_comment2 = $this->postComment($this->node, $this->randomMachineName(), $this->randomMachineName());
    $this->assertTrue($this->commentExists($anonymous_comment2), 'Anonymous comment with contact info (optional) found.');
+2 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ public function testConfigOverride() {

    // Both the cache context and tag should be present.
    $this->assertCacheContext('config_override_integration_test');
    $this->assertCacheTag('config_override_integration_test_tag');
    $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'config_override_integration_test_tag');

    // Flip the state of the cache context. The block label should now be
    // overridden.
@@ -62,7 +62,7 @@ public function testConfigOverride() {

    // Both the cache context and tag should still be present.
    $this->assertCacheContext('config_override_integration_test');
    $this->assertCacheTag('config_override_integration_test_tag');
    $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'config_override_integration_test_tag');
  }

}
Loading