scratch – Blame information for rev 120
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
120 | office | 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 SQLite3Test 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 | } |