Skip to content

Commit 18dd3dc

Browse files
committed
Fixing initialization or Parser in test
1 parent f080e8b commit 18dd3dc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/IntegrationTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
namespace SymfonyDocsBuilder\Tests;
1111

12+
use Doctrine\RST\Builder;
1213
use Doctrine\RST\Configuration;
1314
use Doctrine\RST\Parser;
1415
use Gajus\Dindent\Indenter;
@@ -90,9 +91,10 @@ public function testParseUnitBlock(string $blockName)
9091
$configuration = new Configuration();
9192
$configuration->setCustomTemplateDirs([__DIR__.'/Templates']);
9293

93-
$parser = new Parser(
94-
KernelFactory::createKernel($this->createBuildConfig(sprintf('%s/fixtures/source/blocks', __DIR__)))
95-
);
94+
$kernel = KernelFactory::createKernel($this->createBuildConfig(sprintf('%s/fixtures/source/blocks', __DIR__)));
95+
// necessary because this initializes some listeners on the kernel
96+
$builder = new Builder($kernel);
97+
$parser = new Parser($kernel);
9698

9799
$sourceFile = sprintf('%s/fixtures/source/blocks/%s.rst', __DIR__, $blockName);
98100

0 commit comments

Comments
 (0)