Passed
Pull Request — master (#251)
by Gabriel
10:21
created

ZendDataCacheTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 3
dl 0
loc 22
rs 10
1
<?php
2
3
namespace Doctrine\Tests\Common\Cache;
4
5
use Doctrine\Common\Cache\CacheProvider;
6
use Doctrine\Common\Cache\ZendDataCache;
7
use const PHP_SAPI;
8
9
/**
10
 * @requires function zend_shm_cache_fetch
11
 */
12
class ZendDataCacheTest extends CacheTest
13
{
14
    protected function setUp() : void
15
    {
16
        if (PHP_SAPI === 'apache2handler') {
17
            return;
18
        }
19
20
        $this->markTestSkipped('Zend Data Cache only works in apache2handler SAPI.');
21
    }
22
23
    public function testGetStats() : void
24
    {
25
        $cache = $this->_getCacheDriver();
26
        $stats = $cache->getStats();
27
28
        self::assertNull($stats);
29
    }
30
31
    protected function _getCacheDriver() : CacheProvider
32
    {
33
        return new ZendDataCache();
34
    }
35
}
36