| 1 | <?php |
||
| 12 | * @requires extension sqlite3 >= 3 |
||
| 13 | */ |
||
| 14 | class SQLite3CacheTest extends CacheTest |
||
| 15 | { |
||
| 16 | private $file; |
||
| 17 | private $sqlite; |
||
| 18 | |||
| 19 | protected function setUp() : void |
||
| 20 | { |
||
| 21 | $this->file = tempnam(null, 'doctrine-cache-test-'); |
||
| 22 | unlink($this->file); |
||
| 23 | $this->sqlite = new SQLite3($this->file); |
||
| 24 | } |
||
| 25 | |||
| 26 | protected function tearDown() : void |
||
| 27 | { |
||
| 28 | $this->sqlite = null; // DB must be closed before |
||
| 29 | unlink($this->file); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function testGetStats() : void |
||
| 33 | { |
||
| 34 | self::assertNull($this->_getCacheDriver()->getStats()); |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritDoc} |
||
| 39 | */ |
||
| 40 | protected function _getCacheDriver() : CacheProvider |
||
| 41 | { |
||
| 42 | return new SQLite3Cache($this->sqlite, 'test_table'); |
||
| 43 | } |
||
| 45 |