X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Ftests%2FDrupal%2FTests%2FCore%2FAssert%2FAssertLegacyTraitTest.php;h=bb39c6d8229c4354e9130e1ffbcb6a5c5ac7b803;hb=refs%2Fheads%2Fd864;hp=d2d7b855b5dae1675b773b58eb3e6c71350fc7ed;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php b/web/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php index d2d7b855b..bb39c6d82 100644 --- a/web/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php +++ b/web/core/tests/Drupal/Tests/Core/Assert/AssertLegacyTraitTest.php @@ -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. *