src/Kunstmaan/AdminBundle/Tests/unit/DependencyInjection/Compiler/AddLogProcessorsCompilerPassTest.php 1 location
|
@@ 11-34 (lines=24) @@
|
8 |
|
use Symfony\Component\DependencyInjection\Definition; |
9 |
|
use Symfony\Component\DependencyInjection\Reference; |
10 |
|
|
11 |
|
class AddLogProcessorsCompilerPassTest extends AbstractCompilerPassTestCase |
12 |
|
{ |
13 |
|
protected function registerCompilerPass(ContainerBuilder $container) |
14 |
|
{ |
15 |
|
$container->addCompilerPass(new AddLogProcessorsCompilerPass()); |
16 |
|
} |
17 |
|
|
18 |
|
public function testContainerKeys() |
19 |
|
{ |
20 |
|
$svcId = 'kunstmaan_admin.logger'; |
21 |
|
$svc = new Definition(); |
22 |
|
$svc->addTag('kunstmaan_admin.logger.processor'); |
23 |
|
$svc->addTag('kunstmaan_admin.logger.processor', ['method' => 'someMethod']); |
24 |
|
$this->setDefinition($svcId, $svc); |
25 |
|
|
26 |
|
$this->compile(); |
27 |
|
|
28 |
|
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall( |
29 |
|
$svcId, |
30 |
|
'pushProcessor', |
31 |
|
[new Reference($svcId)] |
32 |
|
); |
33 |
|
} |
34 |
|
} |
35 |
|
|
src/Kunstmaan/DashboardBundle/Tests/unit/DependencyInjection/Compiler/WidgetCompilerPassTest.php 1 location
|
@@ 11-34 (lines=24) @@
|
8 |
|
use Symfony\Component\DependencyInjection\Definition; |
9 |
|
use Symfony\Component\DependencyInjection\Reference; |
10 |
|
|
11 |
|
class WidgetCompilerPassTest extends AbstractCompilerPassTestCase |
12 |
|
{ |
13 |
|
protected function registerCompilerPass(ContainerBuilder $container) |
14 |
|
{ |
15 |
|
$container->addCompilerPass(new WidgetCompilerPass()); |
16 |
|
} |
17 |
|
|
18 |
|
public function testContainerKeys() |
19 |
|
{ |
20 |
|
$svcId = 'kunstmaan_dashboard.manager.widgets'; |
21 |
|
$svc = new Definition(); |
22 |
|
$svc->addTag('kunstmaan_dashboard.widget'); |
23 |
|
$svc->addTag('kunstmaan_dashboard.widget', ['method' => 'someMethod']); |
24 |
|
$this->setDefinition($svcId, $svc); |
25 |
|
|
26 |
|
$this->compile(); |
27 |
|
|
28 |
|
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall( |
29 |
|
$svcId, |
30 |
|
'addWidget', |
31 |
|
[new Reference($svcId)] |
32 |
|
); |
33 |
|
} |
34 |
|
} |
35 |
|
|
src/Kunstmaan/FixturesBundle/Tests/unit/DependencyInjection/Compiler/BuilderCompilerPassTest.php 1 location
|
@@ 11-33 (lines=23) @@
|
8 |
|
use Symfony\Component\DependencyInjection\Definition; |
9 |
|
use Symfony\Component\DependencyInjection\Reference; |
10 |
|
|
11 |
|
class BuilderCompilerPassTest extends AbstractCompilerPassTestCase |
12 |
|
{ |
13 |
|
protected function registerCompilerPass(ContainerBuilder $container) |
14 |
|
{ |
15 |
|
$container->addCompilerPass(new BuilderCompilerPass()); |
16 |
|
} |
17 |
|
|
18 |
|
public function testContainerKeys() |
19 |
|
{ |
20 |
|
$svcId = 'kunstmaan_fixtures.builder.builder'; |
21 |
|
$svc = new Definition(); |
22 |
|
$svc->addTag('kunstmaan_fixtures.builder', ['alias' => 'someAlias']); |
23 |
|
$this->setDefinition($svcId, $svc); |
24 |
|
|
25 |
|
$this->compile(); |
26 |
|
|
27 |
|
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall( |
28 |
|
$svcId, |
29 |
|
'addBuilder', |
30 |
|
[new Reference($svcId), 'someAlias'] |
31 |
|
); |
32 |
|
} |
33 |
|
} |
34 |
|
|
src/Kunstmaan/FixturesBundle/Tests/unit/DependencyInjection/Compiler/PopulatorCompilerPassTest.php 1 location
|
@@ 11-34 (lines=24) @@
|
8 |
|
use Symfony\Component\DependencyInjection\Definition; |
9 |
|
use Symfony\Component\DependencyInjection\Reference; |
10 |
|
|
11 |
|
class PopulatorCompilerPassTest extends AbstractCompilerPassTestCase |
12 |
|
{ |
13 |
|
protected function registerCompilerPass(ContainerBuilder $container) |
14 |
|
{ |
15 |
|
$container->addCompilerPass(new PopulatorCompilerPass()); |
16 |
|
} |
17 |
|
|
18 |
|
public function testContainerKeys() |
19 |
|
{ |
20 |
|
$svcId = 'kunstmaan_fixtures.populator.populator'; |
21 |
|
$svc = new Definition(); |
22 |
|
$svc->addTag('kunstmaan_fixtures.populator', ['alias' => 'someAlias']); |
23 |
|
$this->setDefinition($svcId, $svc); |
24 |
|
$this->setDefinition('kunstmaan_fixtures.builder.builder', new Definition()); |
25 |
|
|
26 |
|
$this->compile(); |
27 |
|
|
28 |
|
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall( |
29 |
|
$svcId, |
30 |
|
'addPopulator', |
31 |
|
[new Reference($svcId), 'someAlias'] |
32 |
|
); |
33 |
|
} |
34 |
|
} |
35 |
|
|
src/Kunstmaan/FixturesBundle/Tests/unit/DependencyInjection/Compiler/ProviderCompilerPassTest.php 1 location
|
@@ 11-33 (lines=23) @@
|
8 |
|
use Symfony\Component\DependencyInjection\Definition; |
9 |
|
use Symfony\Component\DependencyInjection\Reference; |
10 |
|
|
11 |
|
class ProviderCompilerPassTest extends AbstractCompilerPassTestCase |
12 |
|
{ |
13 |
|
protected function registerCompilerPass(ContainerBuilder $container) |
14 |
|
{ |
15 |
|
$container->addCompilerPass(new ProviderCompilerPass()); |
16 |
|
} |
17 |
|
|
18 |
|
public function testContainerKeys() |
19 |
|
{ |
20 |
|
$svcId = 'kunstmaan_fixtures.builder.builder'; |
21 |
|
$svc = new Definition(); |
22 |
|
$svc->addTag('kunstmaan_fixtures.provider', ['alias' => 'someAlias']); |
23 |
|
$this->setDefinition($svcId, $svc); |
24 |
|
|
25 |
|
$this->compile(); |
26 |
|
|
27 |
|
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall( |
28 |
|
$svcId, |
29 |
|
'addProvider', |
30 |
|
[new Reference($svcId), 'someAlias'] |
31 |
|
); |
32 |
|
} |
33 |
|
} |
34 |
|
|
src/Kunstmaan/SearchBundle/Tests/unit/DependencyInjection/Compiler/SearchConfigurationCompilerPassTest.php 1 location
|
@@ 11-33 (lines=23) @@
|
8 |
|
use Symfony\Component\DependencyInjection\Definition; |
9 |
|
use Symfony\Component\DependencyInjection\Reference; |
10 |
|
|
11 |
|
class SearchConfigurationCompilerPassTest extends AbstractCompilerPassTestCase |
12 |
|
{ |
13 |
|
protected function registerCompilerPass(ContainerBuilder $container) |
14 |
|
{ |
15 |
|
$container->addCompilerPass(new SearchConfigurationCompilerPass()); |
16 |
|
} |
17 |
|
|
18 |
|
public function testContainerKeys() |
19 |
|
{ |
20 |
|
$svcId = 'kunstmaan_search.search_configuration_chain'; |
21 |
|
$svc = new Definition(); |
22 |
|
$svc->addTag('kunstmaan_search.search_configuration', ['alias' => 'someAlias']); |
23 |
|
$this->setDefinition($svcId, $svc); |
24 |
|
|
25 |
|
$this->compile(); |
26 |
|
|
27 |
|
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall( |
28 |
|
$svcId, |
29 |
|
'addConfiguration', |
30 |
|
[new Reference($svcId), 'someAlias'] |
31 |
|
); |
32 |
|
} |
33 |
|
} |
34 |
|
|
src/Kunstmaan/SearchBundle/Tests/unit/DependencyInjection/Compiler/SearchProviderCompilerPassTest.php 1 location
|
@@ 11-33 (lines=23) @@
|
8 |
|
use Symfony\Component\DependencyInjection\Definition; |
9 |
|
use Symfony\Component\DependencyInjection\Reference; |
10 |
|
|
11 |
|
class SearchProviderCompilerPassTest extends AbstractCompilerPassTestCase |
12 |
|
{ |
13 |
|
protected function registerCompilerPass(ContainerBuilder $container) |
14 |
|
{ |
15 |
|
$container->addCompilerPass(new SearchProviderCompilerPass()); |
16 |
|
} |
17 |
|
|
18 |
|
public function testContainerKeys() |
19 |
|
{ |
20 |
|
$svcId = 'kunstmaan_search.search_provider_chain'; |
21 |
|
$svc = new Definition(); |
22 |
|
$svc->addTag('kunstmaan_search.search_provider', ['alias' => 'someAlias']); |
23 |
|
$this->setDefinition($svcId, $svc); |
24 |
|
|
25 |
|
$this->compile(); |
26 |
|
|
27 |
|
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall( |
28 |
|
$svcId, |
29 |
|
'addProvider', |
30 |
|
[new Reference($svcId), 'someAlias'] |
31 |
|
); |
32 |
|
} |
33 |
|
} |
34 |
|
|