@@ -49,7 +49,7 @@ public function testGetStepsWithDefaultCase(): void
4949 $ this ->setEntityObjectHandlerReturn ($ entity );
5050 $ actionGroupUnderTest = (new ActionGroupObjectBuilder ())->build ();
5151 $ steps = $ actionGroupUnderTest ->getSteps (null , self ::ACTION_GROUP_MERGE_KEY );
52- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'literal ' ]);
52+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'literal ' , ' requiredCredentials ' => '' ]);
5353 }
5454
5555 /**
@@ -67,30 +67,48 @@ public function testGetStepsWithCustomArgs(): void
6767 });
6868
6969 $ actionGroupUnderTest = (new ActionGroupObjectBuilder ())
70- ->withActionObjects ([new ActionObject ('action1 ' , 'testAction ' , ['userInput ' => '{{arg1.field2}} ' ])])
71- ->withArguments ([new ArgumentObject ('arg1 ' , null , 'entity ' )])
72- ->build ();
70+ ->withActionObjects ([new ActionObject (
71+ 'action1 ' ,
72+ 'testAction ' ,
73+ [
74+ 'userInput ' => '{{arg1.field2}} ' ,'requiredCredentials ' => ''
75+ ]
76+ )])
77+ ->withArguments ([new ArgumentObject ('arg1 ' , null , 'entity ' )])
78+ ->build ();
7379
7480 $ steps = $ actionGroupUnderTest ->getSteps (['arg1 ' => 'data2 ' ], self ::ACTION_GROUP_MERGE_KEY );
75- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue2 ' ]);
81+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue2 ' , ' requiredCredentials ' => '' ]);
7682
7783 // entity.field as argument
7884 $ actionGroupUnderTest = (new ActionGroupObjectBuilder ())
79- ->withActionObjects ([new ActionObject ('action1 ' , 'testAction ' , ['userInput ' => '{{arg1}} ' ])])
85+ ->withActionObjects ([new ActionObject (
86+ 'action1 ' ,
87+ 'testAction ' ,
88+ ['userInput ' => '{{arg1}} ' ,
89+ 'requiredCredentials ' => ''
90+ ]
91+ )])
8092 ->withArguments ([new ArgumentObject ('arg1 ' , null , 'entity ' )])
8193 ->build ();
8294
8395 $ steps = $ actionGroupUnderTest ->getSteps (['arg1 ' => 'data2.field2 ' ], self ::ACTION_GROUP_MERGE_KEY );
84- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue2 ' ]);
96+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue2 ' , ' requiredCredentials ' => '' ]);
8597
8698 // String Data
8799 $ actionGroupUnderTest = (new ActionGroupObjectBuilder ())
88- ->withActionObjects ([new ActionObject ('action1 ' , 'testAction ' , ['userInput ' => '{{simple}} ' ])])
100+ ->withActionObjects ([new ActionObject (
101+ 'action1 ' ,
102+ 'testAction ' ,
103+ ['userInput ' => '{{simple}} ' ,
104+ 'requiredCredentials ' => ''
105+ ]
106+ )])
89107 ->withArguments ([new ArgumentObject ('simple ' , null , 'string ' )])
90108 ->build ();
91109
92110 $ steps = $ actionGroupUnderTest ->getSteps (['simple ' => 'override ' ], self ::ACTION_GROUP_MERGE_KEY );
93- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'override ' ]);
111+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'override ' , ' requiredCredentials ' => '' ]);
94112 }
95113
96114 /**
@@ -102,21 +120,32 @@ public function testGetStepsWithCustomArgs(): void
102120 public function testGetStepsWithPersistedArgs (): void
103121 {
104122 $ actionGroupUnderTest = (new ActionGroupObjectBuilder ())
105- ->withActionObjects ([new ActionObject ('action1 ' , 'testAction ' , ['userInput ' => '{{arg1.field2}} ' ])])
123+ ->withActionObjects ([new ActionObject (
124+ 'action1 ' ,
125+ 'testAction ' ,
126+ ['userInput ' => '{{arg1.field2}} ' ,
127+ 'requiredCredentials ' => '' ]
128+ )])
106129 ->withArguments ([new ArgumentObject ('arg1 ' , null , 'entity ' )])
107130 ->build ();
108131
109132 $ steps = $ actionGroupUnderTest ->getSteps (['arg1 ' => '$data3$ ' ], self ::ACTION_GROUP_MERGE_KEY );
110- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => '$data3.field2$ ' ]);
133+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => '$data3.field2$ ' , ' requiredCredentials ' => '' ]);
111134
112135 // Simple Data
113136 $ actionGroupUnderTest = (new ActionGroupObjectBuilder ())
114- ->withActionObjects ([new ActionObject ('action1 ' , 'testAction ' , ['userInput ' => '{{simple}} ' ])])
137+ ->withActionObjects ([new ActionObject (
138+ 'action1 ' ,
139+ 'testAction ' ,
140+ ['userInput ' => '{{simple}} ' ,
141+ 'requiredCredentials ' => ''
142+ ]
143+ )])
115144 ->withArguments ([new ArgumentObject ('simple ' , null , 'string ' )])
116145 ->build ();
117146
118147 $ steps = $ actionGroupUnderTest ->getSteps (['simple ' => '$data3.field2$ ' ], self ::ACTION_GROUP_MERGE_KEY );
119- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => '$data3.field2$ ' ]);
148+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => '$data3.field2$ ' , ' requiredCredentials ' => '' ]);
120149 }
121150
122151 /**
@@ -134,12 +163,18 @@ public function testGetStepsWithNoFieldArg(): void
134163 });
135164
136165 $ actionGroupUnderTest = (new ActionGroupObjectBuilder ())
137- ->withActionObjects ([new ActionObject ('action1 ' , 'testAction ' , ['userInput ' => '{{arg1}} ' ])])
166+ ->withActionObjects ([new ActionObject (
167+ 'action1 ' ,
168+ 'testAction ' ,
169+ ['userInput ' => '{{arg1}} ' ,
170+ 'requiredCredentials ' => ''
171+ ]
172+ )])
138173 ->withArguments ([new ArgumentObject ('arg1 ' , null , 'entity ' )])
139174 ->build ();
140175
141176 $ steps = $ actionGroupUnderTest ->getSteps (['arg1 ' => 'data2.field2 ' ], self ::ACTION_GROUP_MERGE_KEY );
142- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue2 ' ]);
177+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue2 ' , ' requiredCredentials ' => '' ]);
143178 }
144179
145180 /**
@@ -157,11 +192,17 @@ public function testGetStepsWithNoArgs(): void
157192 });
158193
159194 $ actionGroupUnderTest = (new ActionGroupObjectBuilder ())
160- ->withActionObjects ([new ActionObject ('action1 ' , 'testAction ' , ['userInput ' => '{{data1.field1}} ' ])])
195+ ->withActionObjects ([new ActionObject (
196+ 'action1 ' ,
197+ 'testAction ' ,
198+ ['userInput ' => '{{data1.field1}} ' ,
199+ 'requiredCredentials ' => ''
200+ ]
201+ )])
161202 ->build ();
162203
163204 $ steps = $ actionGroupUnderTest ->getSteps (null , self ::ACTION_GROUP_MERGE_KEY );
164- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue ' ]);
205+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue ' , ' requiredCredentials ' => '' ]);
165206 }
166207
167208 /**
@@ -199,11 +240,22 @@ public function testGetStepsWithParameterizedArg(): void
199240
200241 // XML Data
201242 $ steps = $ actionGroupUnderTest ->getSteps (['arg1 ' => 'data2 ' ], self ::ACTION_GROUP_MERGE_KEY );
202- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['selector ' => '.selector testValue2 ' ]);
243+ $ this ->assertOnMergeKeyAndActionValue ($ steps , [
244+ 'selector ' => '.selector testValue2 ' ,
245+ 'requiredCredentials ' => ''
246+ ]);
203247
204248 // Persisted Data
205- $ steps = $ actionGroupUnderTest ->getSteps (['arg1 ' => '$data2$ ' ], self ::ACTION_GROUP_MERGE_KEY );
206- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['selector ' => '.selector $data2.field2$ ' ]);
249+ $ steps = $ actionGroupUnderTest ->getSteps (
250+ ['arg1 ' => '$data2$ ' ],
251+ self ::ACTION_GROUP_MERGE_KEY
252+ );
253+ $ this ->assertOnMergeKeyAndActionValue (
254+ $ steps ,
255+ ['selector ' => '.selector $data2.field2$ ' ,
256+ 'requiredCredentials ' => ''
257+ ]
258+ );
207259 }
208260
209261 /**
@@ -242,15 +294,28 @@ public function testGetStepsWithParameterizedSimpleArg(): void
242294
243295 // String Literal
244296 $ steps = $ actionGroupUnderTest ->getSteps (['simple ' => 'stringLiteral ' ], self ::ACTION_GROUP_MERGE_KEY );
245- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['selector ' => '.selector stringLiteral ' ]);
297+ $ this ->assertOnMergeKeyAndActionValue ($ steps , [
298+ 'selector ' => '.selector stringLiteral ' ,
299+ 'requiredCredentials ' => ''
300+ ]);
246301
247302 // String Literal w/ data-like structure
248303 $ steps = $ actionGroupUnderTest ->getSteps (['simple ' => 'data2.field2 ' ], self ::ACTION_GROUP_MERGE_KEY );
249- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['selector ' => '.selector data2.field2 ' ]);
304+ $ this ->assertOnMergeKeyAndActionValue (
305+ $ steps ,
306+ ['selector ' => '.selector data2.field2 ' ,
307+ 'requiredCredentials ' => ''
308+ ]
309+ );
250310
251311 // Persisted Data
252312 $ steps = $ actionGroupUnderTest ->getSteps (['simple ' => '$someData.field1$ ' ], self ::ACTION_GROUP_MERGE_KEY );
253- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['selector ' => '.selector $someData.field1$ ' ]);
313+ $ this ->assertOnMergeKeyAndActionValue (
314+ $ steps ,
315+ ['selector ' => '.selector $someData.field1$ ' ,
316+ 'requiredCredentials ' => ''
317+ ]
318+ );
254319 }
255320
256321 /**
@@ -267,7 +332,12 @@ public function testGetStepsWithOuterScopePersistence(): void
267332 ->build ();
268333
269334 $ steps = $ actionGroupUnderTest ->getSteps (['arg1 ' => '$$someData$$ ' ], self ::ACTION_GROUP_MERGE_KEY );
270- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => '$$someData.field1$$ ' ]);
335+ $ this ->assertOnMergeKeyAndActionValue (
336+ $ steps ,
337+ ['userInput ' => '$$someData.field1$$ ' ,
338+ 'requiredCredentials ' => ''
339+ ]
340+ );
271341 }
272342
273343 /**
0 commit comments