Add getStats() method for MemoryCaches
This commit is contained in:
parent
ffb621f0e4
commit
01296e98f9
12 changed files with 170 additions and 0 deletions
|
@ -59,4 +59,21 @@ class MemcacheCacheTest extends MemoryCacheTestCase
|
|||
{
|
||||
static::markTestIncomplete('Race condition because of too fast getAllKeys() which uses a workaround');
|
||||
}
|
||||
|
||||
/**
|
||||
* @small
|
||||
*/
|
||||
public function testStats()
|
||||
{
|
||||
$stats = $this->instance->getStats();
|
||||
|
||||
self::assertNotNull($stats['version']);
|
||||
self::assertIsNumeric($stats['hits']);
|
||||
self::assertIsNumeric($stats['misses']);
|
||||
self::assertIsNumeric($stats['evictions']);
|
||||
self::assertIsNumeric($stats['entries']);
|
||||
self::assertIsNumeric($stats['used_memory']);
|
||||
self::assertGreaterThan(0, $stats['connected_clients']);
|
||||
self::assertGreaterThan(0, $stats['uptime']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue