| @@ 36-53 (lines=18) @@ | ||
| 33 | $this->compilerPass = new TemplatingCompilerPass(); |
|
| 34 | } |
|
| 35 | ||
| 36 | public function testPhpTemplating() |
|
| 37 | { |
|
| 38 | $containerBuilder = $this->createContainerBuilderMock(); |
|
| 39 | $containerBuilder |
|
| 40 | ->expects($this->exactly(2)) |
|
| 41 | ->method('hasDefinition') |
|
| 42 | ->will($this->returnValueMap([ |
|
| 43 | ['templating.engine.php', false], |
|
| 44 | ['twig', true], |
|
| 45 | ])); |
|
| 46 | ||
| 47 | $containerBuilder |
|
| 48 | ->expects($this->once()) |
|
| 49 | ->method('removeDefinition') |
|
| 50 | ->with($this->identicalTo('fosck_editor.templating.helper')); |
|
| 51 | ||
| 52 | $this->compilerPass->process($containerBuilder); |
|
| 53 | } |
|
| 54 | ||
| 55 | public function testTwigTemplating() |
|
| 56 | { |
|
| @@ 55-72 (lines=18) @@ | ||
| 52 | $this->compilerPass->process($containerBuilder); |
|
| 53 | } |
|
| 54 | ||
| 55 | public function testTwigTemplating() |
|
| 56 | { |
|
| 57 | $containerBuilder = $this->createContainerBuilderMock(); |
|
| 58 | $containerBuilder |
|
| 59 | ->expects($this->exactly(2)) |
|
| 60 | ->method('hasDefinition') |
|
| 61 | ->will($this->returnValueMap([ |
|
| 62 | ['templating.engine.php', true], |
|
| 63 | ['twig', false], |
|
| 64 | ])); |
|
| 65 | ||
| 66 | $containerBuilder |
|
| 67 | ->expects($this->once()) |
|
| 68 | ->method('removeDefinition') |
|
| 69 | ->with($this->identicalTo('fosck_editor.twig_extension')); |
|
| 70 | ||
| 71 | $this->compilerPass->process($containerBuilder); |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * @return ContainerBuilder|\PHPUnit_Framework_MockObject_MockObject |
|