Pull merge.
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Assert / AssertLegacyTraitTest.php
index d2d7b855b5dae1675b773b58eb3e6c71350fc7ed..bb39c6d8229c4354e9130e1ffbcb6a5c5ac7b803 100644 (file)
@@ -14,6 +14,7 @@ use PHPUnit_Framework_ExpectationFailedException;
 /**
  * @coversDefaultClass \Drupal\FunctionalTests\AssertLegacyTrait
  * @group Assert
+ * @group legacy
  */
 class AssertLegacyTraitTest extends UnitTestCase {
 
@@ -164,6 +165,18 @@ class AssertLegacyTraitTest extends UnitTestCase {
     $this->assertNoPattern('/.*foo$/');
   }
 
+  /**
+   * @covers ::assertNoCacheTag
+   * @expectedDeprecation assertNoCacheTag() is deprecated and scheduled for removal in Drupal 9.0.0. Use $this->assertSession()->responseHeaderNotContains() instead. See https://www.drupal.org/node/2864029.
+   */
+  public function testAssertNoCacheTag() {
+    $this->webAssert
+      ->responseHeaderNotContains('X-Drupal-Cache-Tags', 'some-cache-tag')
+      ->shouldBeCalled();
+
+    $this->assertNoCacheTag('some-cache-tag');
+  }
+
   /**
    * Returns a mocked behat session object.
    *