You are here

public function Redis_Tests_Cache_FlushUnitTestCase::testOrder in Redis 7.3

File

lib/Redis/Tests/Cache/FlushUnitTestCase.php, line 169

Class

Redis_Tests_Cache_FlushUnitTestCase

Code

public function testOrder() {
  $backend = $this
    ->getBackend();
  for ($i = 0; $i < 10; ++$i) {
    $id = 'speedtest' . $i;
    $backend
      ->set($id, 'somevalue');
    $this
      ->assertNotIdentical(false, $backend
      ->get($id));
    $backend
      ->clear('*', true);

    // Value created the same second before is dropped
    $this
      ->assertFalse($backend
      ->get($id));
    $backend
      ->set($id, 'somevalue');

    // Value created the same second after is kept
    $this
      ->assertNotIdentical(false, $backend
      ->get($id));
  }
}