public function testStats() { $stats = new FilecacheStatisticsTracker(vfsStream::url('cacheDir')); $manager = new FilecacheStatisticsManager(vfsStream::url('cacheDir')); $this->cache->setStatisticsTracker($stats); $this->cache->get('test'); $this->cache->set('test', 'testing', 300); $this->cache->get('test'); $data = $manager->getStatistics(); $this->assertEquals(array('File cache'), array_keys($data)); $numbers = $data['File cache']->getFormattedArray(); $this->assertEquals(array('Hits' => 1, 'Misses' => 1, 'Helpfulness' => '50.00'), $numbers); }