File tree Expand file tree Collapse file tree 5 files changed +10
-7
lines changed
src/bundle/DependencyInjection
tests/bundle/DependencyInjection
Configuration/Parser/FieldType Expand file tree Collapse file tree 5 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class Configuration extends SiteAccessConfiguration
2323 */
2424 public function getConfigTreeBuilder ()
2525 {
26- $ treeBuilder = new TreeBuilder (' ezrichtext ' );
26+ $ treeBuilder = new TreeBuilder (IbexaFieldTypeRichTextExtension:: EXTENSION_NAME );
2727
2828 $ rootNode = $ treeBuilder ->getRootNode ();
2929
Original file line number Diff line number Diff line change 2323 */
2424class IbexaFieldTypeRichTextExtension extends Extension implements PrependExtensionInterface
2525{
26+ public const EXTENSION_NAME = 'ibexa_fieldtype_richtext ' ;
27+
2628 const RICHTEXT_CUSTOM_STYLES_PARAMETER = 'ezplatform.ezrichtext.custom_styles ' ;
2729 const RICHTEXT_CUSTOM_TAGS_PARAMETER = 'ezplatform.ezrichtext.custom_tags ' ;
2830 const RICHTEXT_ALLOY_EDITOR_PARAMETER = 'ezplatform.ezrichtext.alloy_editor ' ;
@@ -32,7 +34,7 @@ class IbexaFieldTypeRichTextExtension extends Extension implements PrependExtens
3234
3335 public function getAlias ()
3436 {
35- return ' ezrichtext ' ;
37+ return self :: EXTENSION_NAME ;
3638 }
3739
3840 /**
@@ -143,7 +145,7 @@ private function prependEzPublishConfiguration(ContainerBuilder $container): voi
143145 private function prependEzRichTextConfiguration (ContainerBuilder $ container ): void
144146 {
145147 $ richTextExtensionConfigFile = realpath (__DIR__ . '/../Resources/config/prepend/ezrichtext.yaml ' );
146- $ container ->prependExtensionConfig (' ezrichtext ' , Yaml::parseFile ($ richTextExtensionConfigFile ));
148+ $ container ->prependExtensionConfig (self :: EXTENSION_NAME , Yaml::parseFile ($ richTextExtensionConfigFile ));
147149 $ container ->addResource (new FileResource ($ richTextExtensionConfigFile ));
148150 }
149151
Original file line number Diff line number Diff line change @@ -34,9 +34,10 @@ class RichTextTest extends AbstractParserTestCase
3434 private function getExtensionsConfig (): array
3535 {
3636 if (null === $ this ->extensionsConfig ) {
37- foreach (['ezrichtext ' , 'ezpublish ' ] as $ extensionName ) {
37+ $ extensionNames = [IbexaFieldTypeRichTextExtension::EXTENSION_NAME , 'ezpublish ' ];
38+ foreach ($ extensionNames as $ extensionName ) {
3839 $ this ->extensionsConfig [$ extensionName ] = Yaml::parseFile (
39- __DIR__ . "/../../.. /Fixtures/ {$ extensionName }.yaml "
40+ dirname ( __DIR__ , 3 ) . "/Fixtures/ {$ extensionName }.yaml "
4041 );
4142 }
4243 }
File renamed without changes.
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ protected function getContainerExtensions(): array
2626 public function testRichTextConfiguration (): void
2727 {
2828 $ config = Yaml::parse (
29- file_get_contents (__DIR__ . '/Fixtures/ezrichtext .yaml ' )
29+ file_get_contents (__DIR__ . '/Fixtures/ibexa_fieldtype_richtext .yaml ' )
3030 );
3131 $ this ->load ($ config );
3232
@@ -123,7 +123,7 @@ public function testPrepend(): void
123123 public function testCheckingInlineCustomTagsInToolbars (string $ toolbarName , ?string $ expectedException ): void
124124 {
125125 $ config = Yaml::parse (
126- file_get_contents (__DIR__ . '/Fixtures/ezrichtext .yaml ' )
126+ file_get_contents (__DIR__ . '/Fixtures/ibexa_fieldtype_richtext .yaml ' )
127127 );
128128 $ config ['custom_tags ' ]['video ' ]['is_inline ' ] = true ;
129129 $ this ->container ->setParameter ('ezpublish.siteaccess.list ' , ['admin_group ' ]);
You can’t perform that action at this time.
0 commit comments