Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd5e79b2

Browse files
[Cache] Use AdapterTestCase for new adapters
1 parentb6bbe43 commitd5e79b2

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

‎src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@
1111

1212
namespaceSymfony\Component\Cache\Tests\Adapter;
1313

14-
useCache\IntegrationTests\CachePoolTest;
1514
usePsr\Cache\CacheItemInterface;
1615
useSymfony\Component\Cache\Adapter\NullAdapter;
1716
useSymfony\Component\Cache\Adapter\PhpArrayAdapter;
1817

19-
class PhpArrayAdapterTestextendsCachePoolTest
18+
class PhpArrayAdapterTestextendsAdapterTestCase
2019
{
2120
protected$skippedTests =array(
2221
'testBasicUsage' =>'PhpArrayAdapter is read-only.',
@@ -45,6 +44,8 @@ class PhpArrayAdapterTest extends CachePoolTest
4544
'testHasItemInvalidKeys' =>'PhpArrayAdapter does not throw exceptions on invalid key.',
4645
'testDeleteItemInvalidKeys' =>'PhpArrayAdapter does not throw exceptions on invalid key.',
4746
'testDeleteItemsInvalidKeys' =>'PhpArrayAdapter does not throw exceptions on invalid key.',
47+
48+
'testDefaultLifeTime' =>'PhpArrayAdapter does not allow configuring a default lifetime.',
4849
);
4950

5051
privatestatic$file;

‎src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterWithFallbackTest.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111

1212
namespaceSymfony\Component\Cache\Tests\Adapter;
1313

14-
useCache\IntegrationTests\CachePoolTest;
1514
useSymfony\Component\Cache\Adapter\FilesystemAdapter;
1615
useSymfony\Component\Cache\Adapter\PhpArrayAdapter;
1716

1817
/**
1918
* @group time-sensitive
2019
*/
21-
class PhpArrayAdapterWithFallbackTestextendsCachePoolTest
20+
class PhpArrayAdapterWithFallbackTestextendsAdapterTestCase
2221
{
2322
protected$skippedTests =array(
2423
'testGetItemInvalidKeys' =>'PhpArrayAdapter does not throw exceptions on invalid key.',
2524
'testGetItemsInvalidKeys' =>'PhpArrayAdapter does not throw exceptions on invalid key.',
2625
'testHasItemInvalidKeys' =>'PhpArrayAdapter does not throw exceptions on invalid key.',
2726
'testDeleteItemInvalidKeys' =>'PhpArrayAdapter does not throw exceptions on invalid key.',
2827
'testDeleteItemsInvalidKeys' =>'PhpArrayAdapter does not throw exceptions on invalid key.',
28+
'testDefaultLifeTime' =>'PhpArrayAdapter does not allow configuring a default lifetime.',
2929
);
3030

3131
privatestatic$file;

‎src/Symfony/Component/Cache/Tests/Adapter/PhpFilesAdapterTest.php‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@
1111

1212
namespaceSymfony\Component\Cache\Tests\Adapter;
1313

14-
useCache\IntegrationTests\CachePoolTest;
1514
useSymfony\Component\Cache\Adapter\PhpFilesAdapter;
1615

1716
/**
1817
* @group time-sensitive
1918
*/
20-
class PhpFilesAdapterTestextendsCachePoolTest
19+
class PhpFilesAdapterTestextendsAdapterTestCase
2120
{
21+
protected$skippedTests =array(
22+
'testDefaultLifeTime' =>'PhpFilesAdapter does not allow configuring a default lifetime.',
23+
);
24+
2225
publicfunctioncreateCachePool()
2326
{
2427
if (defined('HHVM_VERSION')) {

‎src/Symfony/Component/Cache/Tests/Adapter/TagAwareRedisAdapterTest.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ public static function setupBeforeClass()
2424
self::$redis->connect('127.0.0.1');
2525
}
2626

27-
publicfunctioncreateCachePool()
27+
publicfunctioncreateCachePool($defaultLifeTime =0)
2828
{
2929
if (defined('HHVM_VERSION')) {
3030
$this->skippedTests['testDeferredSaveWithoutCommit'] ='Fails on HHVM';
3131
}
3232

33-
returnnewTagAwareRedisAdapter(self::$redis,str_replace('\\','.',__CLASS__));
33+
returnnewTagAwareRedisAdapter(self::$redis,str_replace('\\','.',__CLASS__),$defaultLifeTime);
3434
}
3535
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp