Browse Source

added cache mset() base test

tags/2.0.0-beta
Panagiotis Moustafellos 11 years ago
parent
commit
4cf05205d4
  1. 19
      tests/unit/framework/caching/CacheTestCase.php

19
tests/unit/framework/caching/CacheTestCase.php

@ -92,6 +92,25 @@ abstract class CacheTestCase extends TestCase
$this->assertEquals('array_test', $array['array_test']);
}
public function testMset()
{
$cache = $this->getCacheInstance();
$cache->flush();
$this->assertTrue($cache->mset(['string_test' => 'string_test',
'number_test' => 42,
'array_test' => ['array_test' => 'array_test'],
]));
$this->assertEquals('string_test', $cache->get('string_test'));
$this->assertEquals(42, $cache->get('number_test'));
$array = $cache->get('array_test');
$this->assertArrayHasKey('array_test', $array);
$this->assertEquals('array_test', $array['array_test']);
}
public function testExists()
{
$cache = $this->prepare();

Loading…
Cancel
Save