| Total Complexity | 1 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | final class SyntaxHighlighterExtensionTest extends PHPUnit_Framework_TestCase { |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Tests the load() method. |
||
| 32 | * |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | public function testLoad() { |
||
| 36 | |||
| 37 | // Set the mocks. |
||
| 38 | $kernel = $this->getMockBuilder(KernelInterface::class)->getMock(); |
||
| 39 | |||
| 40 | // We set a container builder with only the necessary. |
||
| 41 | $container = new ContainerBuilder(new ParameterBag(["kernel.environment" => "dev"])); |
||
| 42 | $container->set("kernel", $kernel); |
||
| 43 | |||
| 44 | $obj = new SyntaxHighlighterExtension(); |
||
| 45 | |||
| 46 | $obj->load([], $container); |
||
| 47 | $this->assertInstanceOf(SyntaxHighlighterTwigExtension::class, $container->get(SyntaxHighlighterTwigExtension::SERVICE_NAME)); |
||
| 48 | } |
||
| 51 |