12
12
namespace Symfony \Bundle \FrameworkBundle \Tests \DependencyInjection \Compiler ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
- use Symfony \Bundle \FrameworkBundle \Command \CachePoolPruneCommand ;
16
15
use Symfony \Bundle \FrameworkBundle \DependencyInjection \Compiler \CachePoolPrunerPass ;
17
16
use Symfony \Component \Cache \Adapter \FilesystemAdapter ;
18
17
use Symfony \Component \Cache \Adapter \PhpFilesAdapter ;
@@ -25,7 +24,7 @@ class CachePoolPrunerPassTest extends TestCase
25
24
public function testCompilerPassReplacesCommandArgument ()
26
25
{
27
26
$ container = new ContainerBuilder ();
28
- $ container ->register (CachePoolPruneCommand::class )->addArgument (array ());
27
+ $ container ->register (' console.command.cache_pool_prune ' )->addArgument (array ());
29
28
$ container ->register ('pool.foo ' , FilesystemAdapter::class)->addTag ('cache.pool ' );
30
29
$ container ->register ('pool.bar ' , PhpFilesAdapter::class)->addTag ('cache.pool ' );
31
30
@@ -36,7 +35,7 @@ public function testCompilerPassReplacesCommandArgument()
36
35
'pool.foo ' => new Reference ('pool.foo ' ),
37
36
'pool.bar ' => new Reference ('pool.bar ' ),
38
37
);
39
- $ argument = $ container ->getDefinition (CachePoolPruneCommand::class )->getArgument (0 );
38
+ $ argument = $ container ->getDefinition (' console.command.cache_pool_prune ' )->getArgument (0 );
40
39
41
40
$ this ->assertInstanceOf (IteratorArgument::class, $ argument );
42
41
$ this ->assertEquals ($ expected , $ argument ->getValues ());
@@ -64,7 +63,7 @@ public function testCompilePassIsIgnoredIfCommandDoesNotExist()
64
63
public function testCompilerPassThrowsOnInvalidDefinitionClass ()
65
64
{
66
65
$ container = new ContainerBuilder ();
67
- $ container ->register (CachePoolPruneCommand::class )->addArgument (array ());
66
+ $ container ->register (' console.command.cache_pool_prune ' )->addArgument (array ());
68
67
$ container ->register ('pool.not-found ' , NotFound::class)->addTag ('cache.pool ' );
69
68
70
69
$ pass = new CachePoolPrunerPass ();
0 commit comments