@@ -18,7 +18,7 @@ class FileHandlerTest extends RepositoryTestCase
18
18
{
19
19
public function testUpdateFields (): void
20
20
{
21
- $ contentService = self ::getContentService ();
21
+ $ contentService = self ::getContentService ();
22
22
$ contentTypeService = self ::getContentTypeService ();
23
23
24
24
// Create new ContentType
@@ -75,7 +75,8 @@ private function createFieldDefinitionStruct(string $identifier, string $name, b
75
75
return $ fieldDefCreateStruct ;
76
76
}
77
77
78
- private function createTypeCreateStruct (): ContentTypeCreateStruct {
78
+ private function createTypeCreateStruct (): ContentTypeCreateStruct
79
+ {
79
80
$ contentTypeService = self ::getContentTypeService ();
80
81
$ typeCreateStruct = $ contentTypeService ->newContentTypeCreateStruct ('multi_lang_drafts ' );
81
82
$ typeCreateStruct ->mainLanguageCode = 'eng-GB ' ;
@@ -84,7 +85,7 @@ private function createTypeCreateStruct(): ContentTypeCreateStruct {
84
85
return $ typeCreateStruct ;
85
86
}
86
87
87
- protected function createNewContent (string $ name , array $ languages = ['eng-GB ' ], int $ parentLocationId = 2 , ): Content
88
+ protected function createNewContent (string $ name , array $ languages = ['eng-GB ' ], int $ parentLocationId = 2 ): Content
88
89
{
89
90
$ contentTypeService = self ::getContentTypeService ();
90
91
$ contentService = self ::getContentService ();
@@ -103,7 +104,7 @@ protected function createNewContent(string $name, array $languages = ['eng-GB'],
103
104
return $ contentService ->publishVersion ($ draft ->versionInfo );
104
105
}
105
106
106
- protected function createUpdateStruct (Content $ content , string $ translatedName , array $ languages )
107
+ protected function createUpdateStruct (Content $ content , string $ translatedName , array $ languages )
107
108
{
108
109
$ contentService = self ::getContentService ();
109
110
@@ -121,6 +122,7 @@ protected function createUpdateStruct(Content $content, string $translatedName,
121
122
122
123
$ updateStruct ->setField ('name ' , $ translatedName , $ language );
123
124
}
125
+
124
126
return $ updateStruct ;
125
127
}
126
128
@@ -131,6 +133,7 @@ protected function createContentDraft(Content $content, string $languageCode): C
131
133
132
134
$ language = $ contentLanguageService ->loadLanguage ($ languageCode );
133
135
$ draft = $ contentService ->createContentDraft ($ content ->contentInfo , null , null , $ language );
136
+
134
137
return $ draft ;
135
138
}
136
139
@@ -142,7 +145,8 @@ protected function updateContent(Content $draft, ContentUpdateStruct $updateStru
142
145
// it will have an additional field (in ger-DE). This does not happen when running the same code in
143
146
// a controller inside the application (you then need to replace 'self::get*Service()' with DI).
144
147
// It seems like for instance decoration Ibexa\Core\Event\ContentService is not used inside tests, maybe other decorations to?
145
- $ updatedDraft = $ contentService ->updateContent ($ draft ->versionInfo ,$ updateStruct );
148
+ $ updatedDraft = $ contentService ->updateContent ($ draft ->versionInfo , $ updateStruct );
149
+
146
150
return $ updatedDraft ;
147
151
}
148
- }
152
+ }
0 commit comments