Completed
Push — master ( 6a3302...cb6884 )
by Marco
63:23 queued 60:23
created

SQLite3CacheTest::testGetStats()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Doctrine\Tests\Common\Cache;
4
5
use Doctrine\Common\Cache\Cache;
6
use Doctrine\Common\Cache\SQLite3Cache;
7
use SQLite3;
8
9
/**
10
 * @requires extension sqlite3
11
 */
12
class SQLite3CacheTest extends CacheTest
13
{
14
    private $file;
15
    private $sqlite;
16
17
    protected function setUp()
18
    {
19
        $this->file = tempnam(null, 'doctrine-cache-test-');
20
        unlink($this->file);
21
        $this->sqlite = new SQLite3($this->file);
22
    }
23
24
    protected function tearDown()
25
    {
26
        $this->sqlite = null;  // DB must be closed before
27
        unlink($this->file);
28
    }
29
30
    public function testGetStats()
31
    {
32
        $this->assertNull($this->_getCacheDriver()->getStats());
33
    }
34
35
    /**
36
     * {@inheritDoc}
37
     */
38
    protected function _getCacheDriver()
39
    {
40
        return new SQLite3Cache($this->sqlite, 'test_table');
41
    }
42
}
43