public function FileCacheTest::testFileExtensionCorrectlyEscaped in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/FileCacheTest.php \Doctrine\Tests\Common\Cache\FileCacheTest::testFileExtensionCorrectlyEscaped()
File
- vendor/
doctrine/ cache/ tests/ Doctrine/ Tests/ Common/ Cache/ FileCacheTest.php, line 118
Class
- FileCacheTest
- @group DCOM-101
Namespace
Doctrine\Tests\Common\CacheCode
public function testFileExtensionCorrectlyEscaped() {
$driver1 = $this
->getMock('Doctrine\\Common\\Cache\\FileCache', array(
'doFetch',
'doContains',
'doSave',
), array(
__DIR__,
'.*',
));
$driver2 = $this
->getMock('Doctrine\\Common\\Cache\\FileCache', array(
'doFetch',
'doContains',
'doSave',
), array(
__DIR__,
'.php',
));
$doGetStats = new \ReflectionMethod($driver1, 'doGetStats');
$doGetStats
->setAccessible(true);
$stats1 = $doGetStats
->invoke($driver1);
$stats2 = $doGetStats
->invoke($driver2);
$this
->assertSame(0, $stats1[Cache::STATS_MEMORY_USAGE]);
$this
->assertGreaterThan(0, $stats2[Cache::STATS_MEMORY_USAGE]);
}