1 | <?php |
||
24 | class InnmindNeo4jBundleTest extends \PHPUnit_Framework_TestCase |
||
25 | { |
||
26 | public function testBuild() |
||
27 | { |
||
28 | $c = new ContainerBuilder; |
||
29 | ($b = new InnmindNeo4jBundle)->build($c); |
||
30 | $this->assertInstanceOf(Bundle::class, $b); |
||
31 | $c->registerExtension(new InnmindNeo4jExtension); |
||
32 | $c->loadFromExtension('innmind_neo4j', []); |
||
33 | $c->setDefinition( |
||
34 | 'event_dispatcher', |
||
35 | new Definition(EventDispatcher::class) |
||
36 | ); |
||
37 | $c->setDefinition( |
||
38 | 'logger', |
||
39 | new Definition(NullLogger::class) |
||
40 | ); |
||
41 | $c->setParameter( |
||
42 | 'kernel.bundles', |
||
43 | [ |
||
44 | 'FixtureFooBundle' => FooBundle::class, |
||
45 | 'FixtureBarBundle' => BarBundle::class, |
||
46 | 'FixtureEmptyBundle' => EmptyBundle::class, |
||
47 | ] |
||
48 | ); |
||
49 | $c->compile(); |
||
50 | |||
51 | $this->assertInstanceOf( |
||
52 | ManagerInterface::class, |
||
53 | $c->get('innmind_neo4j.manager') |
||
54 | ); |
||
55 | } |
||
56 | } |
||
57 |