Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295845

ShortcutCacheTagsTest needlessly test the render cache.

$
0
0

Problem/Motivation

ShortcutCacheTagsTest::testEntityCreation() check for cache entries in the render cache even though nothing was cached. This needlessly complicates things as any refactoring of the render cache might inadvertently make these tests fail as shown in #2551419-158: Abstract RenderCache into a separate service that is capable of cache redirects in a non-render array-specific way

Steps to reproduce

NA

Proposed resolution

Add a new method to the base class that allows you to run a slimmed down version of verifyRenderCache that only runs the basic checks, does not check for redirects and, most importantly, uses the default cache backend.

Remaining tasks

  • Fix. Done

User interface changes

None

Introduced terminology

None

API changes

None

Data model changes

None

Release notes snippet

None

Original report by @kristiaanvandeneynde

ItemCacheTagsTest::testEntityCreation() and ShortcutCacheTagsTest::testEntityCreation() check for cache entries in the render cache even though nothing was cached. This needlessly complicates things as any refactoring of the render cache might inadvertently make these tests fail as shown in #2551419-158: Abstract RenderCache into a separate service that is capable of cache redirects in a non-render array-specific way

The easy fix is to add a new method to the base class that allows you to run a slimmed down version of verifyRenderCache that only runs the basic checks, does not check for redirects and, most importantly, uses the default cache backend.


Viewing all articles
Browse latest Browse all 295845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>