Merge pull request #17253 from mattwire/utf8convertblocksize
[civicrm-core.git] / tests / phpunit / CRM / Core / BAO / PrevNextCacheTest.php
index 2c3a6175dc987d5edbcbf01588945dd99ebe530c..3c1e92fc8b63e9aa8338aa0d611fc11552e1e099 100644 (file)
@@ -46,22 +46,4 @@ class CRM_Core_BAO_PrevNextCacheTest extends CiviUnitTestCase {
     $this->quickCleanup(['civicrm_prevnext_cache']);
   }
 
-  public function testSetItem() {
-    $cacheKeyString = 'TestCacheKeyString';
-    $data = '1234afgbghh';
-    $values = [];
-    $values[] = " ( 'civicrm_contact', 0, 0, '{$cacheKeyString}_stats', '$data' ) ";
-    $valueArray = CRM_Core_BAO_PrevNextCache::convertSetItemValues($values[0]);
-    // verify as SetItem would do that it converts the original values style into a sensible array format
-    $this->assertEquals(['civicrm_contact', 0, 0, 'TestCacheKeyString_stats', '1234afgbghh'], $valueArray);
-    CRM_Core_BAO_PrevNextCache::setItem($valueArray[0], $valueArray[1], $valueArray[2], $valueArray[3], $valueArray[4]);
-    $dao = new CRM_Core_BAO_PrevNextCache();
-    $dao->cacheKey = 'TestCacheKeyString_stats';
-    $dao->find(TRUE);
-    $this->assertEquals('1234afgbghh', $dao->data);
-    $this->assertEquals(0, $dao->entity_id1);
-    $this->assertEquals(0, $dao->entity_id2);
-    $this->assertEquals('civicrm_contact', $dao->entity_table);
-  }
-
 }