@@ -49,7 +49,7 @@ public function testGetStepsWithDefaultCase(): void
49
49
$ this ->setEntityObjectHandlerReturn ($ entity );
50
50
$ actionGroupUnderTest = (new ActionGroupObjectBuilder ())->build ();
51
51
$ steps = $ actionGroupUnderTest ->getSteps (null , self ::ACTION_GROUP_MERGE_KEY );
52
- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'literal ' ]);
52
+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'literal ' , ' requiredCredentials ' => '' ]);
53
53
}
54
54
55
55
/**
@@ -67,30 +67,48 @@ public function testGetStepsWithCustomArgs(): void
67
67
});
68
68
69
69
$ 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 ();
73
79
74
80
$ steps = $ actionGroupUnderTest ->getSteps (['arg1 ' => 'data2 ' ], self ::ACTION_GROUP_MERGE_KEY );
75
- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue2 ' ]);
81
+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue2 ' , ' requiredCredentials ' => '' ]);
76
82
77
83
// entity.field as argument
78
84
$ 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
+ )])
80
92
->withArguments ([new ArgumentObject ('arg1 ' , null , 'entity ' )])
81
93
->build ();
82
94
83
95
$ steps = $ actionGroupUnderTest ->getSteps (['arg1 ' => 'data2.field2 ' ], self ::ACTION_GROUP_MERGE_KEY );
84
- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue2 ' ]);
96
+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue2 ' , ' requiredCredentials ' => '' ]);
85
97
86
98
// String Data
87
99
$ 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
+ )])
89
107
->withArguments ([new ArgumentObject ('simple ' , null , 'string ' )])
90
108
->build ();
91
109
92
110
$ steps = $ actionGroupUnderTest ->getSteps (['simple ' => 'override ' ], self ::ACTION_GROUP_MERGE_KEY );
93
- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'override ' ]);
111
+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'override ' , ' requiredCredentials ' => '' ]);
94
112
}
95
113
96
114
/**
@@ -102,21 +120,32 @@ public function testGetStepsWithCustomArgs(): void
102
120
public function testGetStepsWithPersistedArgs (): void
103
121
{
104
122
$ 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
+ )])
106
129
->withArguments ([new ArgumentObject ('arg1 ' , null , 'entity ' )])
107
130
->build ();
108
131
109
132
$ 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 ' => '' ]);
111
134
112
135
// Simple Data
113
136
$ 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
+ )])
115
144
->withArguments ([new ArgumentObject ('simple ' , null , 'string ' )])
116
145
->build ();
117
146
118
147
$ 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 ' => '' ]);
120
149
}
121
150
122
151
/**
@@ -134,12 +163,18 @@ public function testGetStepsWithNoFieldArg(): void
134
163
});
135
164
136
165
$ 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
+ )])
138
173
->withArguments ([new ArgumentObject ('arg1 ' , null , 'entity ' )])
139
174
->build ();
140
175
141
176
$ steps = $ actionGroupUnderTest ->getSteps (['arg1 ' => 'data2.field2 ' ], self ::ACTION_GROUP_MERGE_KEY );
142
- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue2 ' ]);
177
+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue2 ' , ' requiredCredentials ' => '' ]);
143
178
}
144
179
145
180
/**
@@ -157,11 +192,17 @@ public function testGetStepsWithNoArgs(): void
157
192
});
158
193
159
194
$ 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
+ )])
161
202
->build ();
162
203
163
204
$ steps = $ actionGroupUnderTest ->getSteps (null , self ::ACTION_GROUP_MERGE_KEY );
164
- $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue ' ]);
205
+ $ this ->assertOnMergeKeyAndActionValue ($ steps , ['userInput ' => 'testValue ' , ' requiredCredentials ' => '' ]);
165
206
}
166
207
167
208
/**
@@ -199,11 +240,22 @@ public function testGetStepsWithParameterizedArg(): void
199
240
200
241
// XML Data
201
242
$ 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
+ ]);
203
247
204
248
// 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
+ );
207
259
}
208
260
209
261
/**
@@ -242,15 +294,28 @@ public function testGetStepsWithParameterizedSimpleArg(): void
242
294
243
295
// String Literal
244
296
$ 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
+ ]);
246
301
247
302
// String Literal w/ data-like structure
248
303
$ 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
+ );
250
310
251
311
// Persisted Data
252
312
$ 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
+ );
254
319
}
255
320
256
321
/**
@@ -267,7 +332,12 @@ public function testGetStepsWithOuterScopePersistence(): void
267
332
->build ();
268
333
269
334
$ 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
+ );
271
341
}
272
342
273
343
/**
0 commit comments