4 * Class CRM_Utils_CacheTest
7 class CRM_Utils_CacheTest
extends CiviUnitTestCase
{
9 public function testNack() {
11 for ($i = 0; $i < 5; $i++
) {
12 $nack = CRM_Utils_Cache
::nack();
13 $this->assertRegExp('/^NACK:[a-z0-9]+$/', $nack);
17 $this->assertEquals($values, array_unique($values));
19 // The random token should at the start should same -- because we don't
20 // the overhead of re-generating it frequently.
21 $this->assertEquals(substr($values[0], 0, 37), substr($values[1], 0, 37));