CRM-19130 - Add test for regression in CRM_Core_BAO_Cache
authorTim Otten <totten@civicrm.org>
Thu, 11 Aug 2016 20:20:56 +0000 (13:20 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 11 Aug 2016 20:20:56 +0000 (13:20 -0700)
commit64c2ecd4d9e767360a638007f6f63ff6d36c5746
treecf516cfc8bf13eccea2aa1c00ab3f0d3d9321abd
parent346aaabaeabb6d82550b18c5f7259b05f6cb19b1
CRM-19130 - Add test for regression in CRM_Core_BAO_Cache

The earlier patch for CRM-19130 broke support for reading individual items
from the SQL cache.  Although the test-suite hits the cache layer a lot
(e.g.  CRM_Utils_Cache_SqlGroupTest), the bug wasn't exposed by other tests
because (a) caches are replicated in-memory and in SQL (b) caches are often
read in batch mode.

This explicitly flushes the in-memory cache and reads the SQL cache.
CRM/Utils/Cache.php
tests/phpunit/CRM/Core/BAO/CacheTest.php [new file with mode: 0644]