22
33namespace Tests \AymDev \CommonMarkBundle \DependencyInjection ;
44
5- use Aymdev \CommonmarkBundle \DependencyInjection \AymdevCommonMarkExtension ;
5+ use Aymdev \CommonmarkBundle \DependencyInjection \AymdevCommonmarkExtension ;
66use Aymdev \CommonmarkBundle \DependencyInjection \Compiler \ConvertersPass ;
77use PHPUnit \Framework \TestCase ;
88use Symfony \Component \DependencyInjection \ContainerBuilder ;
@@ -17,7 +17,7 @@ class ConfigurationTest extends TestCase
1717 public function testConfigurationFormat ($ config )
1818 {
1919 $ container = new ContainerBuilder ();
20- $ extension = new AymdevCommonMarkExtension ();
20+ $ extension = new AymdevCommonmarkExtension ();
2121
2222 self ::assertNull ($ extension ->load ($ config , $ container ));
2323 $ converters = $ container ->getParameter (ConvertersPass::PARAMETER_CONVERTERS );
@@ -44,4 +44,19 @@ public function provideConfiguration(): \Generator
4444 yield [Yaml::parse (file_get_contents ($ file ))];
4545 }
4646 }
47+
48+ public function testConverterOptionsAreWellParsed ()
49+ {
50+ $ file = __DIR__ . '/../Fixtures/config/configuration_options.yaml ' ;
51+ $ config = Yaml::parse (file_get_contents ($ file ));
52+
53+ $ container = new ContainerBuilder ();
54+ $ extension = new AymdevCommonmarkExtension ();
55+
56+ $ extension ->load ($ config , $ container );
57+ $ converter = $ container ->getParameter (ConvertersPass::PARAMETER_CONVERTERS );
58+
59+ $ expectedOptions = $ config ['aymdev_commonmark ' ]['converters ' ]['my_converter ' ]['options ' ];
60+ self ::assertSame ($ expectedOptions , $ converter ['my_converter ' ]['options ' ]);
61+ }
4762}
0 commit comments