Skip to content

Commit

Permalink
minor #44758 [FrameworkBundle] Fix test to actually use data provider…
Browse files Browse the repository at this point in the history
… (kbond)

This PR was merged into the 5.3 branch.

Discussion
----------

[FrameworkBundle] Fix test to actually use data provider

| Q             | A
| ------------- | ---
| Branch?       | 5.3
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | n/a
| License       | MIT
| Doc PR        | n/a

#44682 didn't actually use the data provider.

Commits
-------

6cafac4 fix test to actually use data provider
  • Loading branch information
kbond committed Dec 21, 2021
2 parents 16f8703 + 6cafac4 commit ea3ea82
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
Expand Up @@ -2,14 +2,11 @@

$container->loadFromExtension('framework', [
'cache' => [
'app' => 'cache.redis_tag_aware.bar',
'app' => 'cache.redis_tag_aware.foo',
'pools' => [
'cache.redis_tag_aware.foo' => [
'adapter' => 'cache.adapter.redis_tag_aware',
],
'cache.redis_tag_aware.bar' => [
'adapter' => 'cache.redis_tag_aware.foo',
],
],
],
]);
Expand Up @@ -7,9 +7,8 @@

<framework:config>
<framework:cache>
<framework:app>cache.redis_tag_aware.bar</framework:app>
<framework:app>cache.redis_tag_aware.foo</framework:app>
<framework:pool name="cache.redis_tag_aware.foo" adapter="cache.adapter.redis_tag_aware" />
<framework:pool name="cache.redis_tag_aware.bar" adapter="cache.redis_tag_aware.foo" />
</framework:cache>
</framework:config>
</container>
@@ -1,8 +1,6 @@
framework:
cache:
app: cache.redis_tag_aware.bar
app: cache.redis_tag_aware.foo
pools:
cache.redis_tag_aware.foo:
adapter: cache.adapter.redis_tag_aware
cache.redis_tag_aware.bar:
adapter: cache.redis_tag_aware.foo
Expand Up @@ -1588,11 +1588,11 @@ public function testRedisTagAwareAdapter()
}

/**
* @dataProvider testAppRedisTagAwareConfigProvider
* @dataProvider appRedisTagAwareConfigProvider
*/
public function testAppRedisTagAwareAdapter()
public function testAppRedisTagAwareAdapter(string $configFile)
{
$container = $this->createContainerFromFile('cache_app_redis_tag_aware');
$container = $this->createContainerFromFile($configFile);

foreach ([TagAwareCacheInterface::class, CacheInterface::class, CacheItemPoolInterface::class] as $alias) {
$def = $container->findDefinition($alias);
Expand All @@ -1605,7 +1605,7 @@ public function testAppRedisTagAwareAdapter()
}
}

public function testAppRedisTagAwareConfigProvider(): array
public function appRedisTagAwareConfigProvider(): array
{
return [
['cache_app_redis_tag_aware'],
Expand Down

0 comments on commit ea3ea82

Please sign in to comment.