@@ -102,6 +102,7 @@ protected function setUp(): void
102
102
* @param InvokedCountMatcher$enableMethodCallExpection
103
103
* @param InvokedCountMatcher $cleanMethodCallExpection
104
104
* @param string $outputMessage
105
+ * @param bool $isTwoFactorAuthEnabled
105
106
* @return void
106
107
* @throws Exception
107
108
* @dataProvider cliCommandProvider
@@ -110,7 +111,8 @@ public function testAdminAdobeImsModuleEnableWillClearCacheWhenSuccessful(
110
111
bool $ testAuthMode ,
111
112
InvokedCountMatcher $ enableMethodCallExpection ,
112
113
InvokedCountMatcher $ cleanMethodCallExpection ,
113
- string $ outputMessage
114
+ string $ outputMessage ,
115
+ bool $ isTwoFactorAuthEnabled
114
116
): void {
115
117
$ inputMock = $ this ->getMockBuilder (InputInterface::class)
116
118
->getMockForAbstractClass ();
@@ -123,6 +125,7 @@ public function testAdminAdobeImsModuleEnableWillClearCacheWhenSuccessful(
123
125
$ this ->imsCommandOptionService ->method ('getOrganizationId ' )->willReturn ('orgId ' );
124
126
$ this ->imsCommandOptionService ->method ('getClientId ' )->willReturn ('clientId ' );
125
127
$ this ->imsCommandOptionService ->method ('getClientSecret ' )->willReturn ('clientSecret ' );
128
+ $ this ->imsCommandOptionService ->method ('isTwoFactorAuthEnabled ' )->willReturn ($ isTwoFactorAuthEnabled );
126
129
127
130
$ this ->imsConnectionMock ->method ('testAuth ' )
128
131
->willReturn ($ testAuthMode );
@@ -161,15 +164,33 @@ public function cliCommandProvider(): array
161
164
true ,
162
165
$ this ->once (),
163
166
$ this ->once (),
164
- 'Admin Adobe IMS integration is enabled '
167
+ 'Admin Adobe IMS integration is enabled ' ,
168
+ true
165
169
],
166
170
[
167
171
false ,
168
172
$ this ->never (),
169
173
$ this ->never (),
170
- '<error>The Client ID, Client Secret and Organization ID are required ' .
171
- 'when enabling the Admin Adobe IMS Module</error> '
174
+ '<error>The Client ID, Client Secret, Organization ID and 2FA Auth are required ' .
175
+ 'when enabling the Admin Adobe IMS Module</error> ' ,
176
+ true
172
177
],
178
+ [
179
+ true ,
180
+ $ this ->never (),
181
+ $ this ->never (),
182
+ '<error>The Client ID, Client Secret, Organization ID and 2FA Auth are required ' .
183
+ 'when enabling the Admin Adobe IMS Module</error> ' ,
184
+ false
185
+ ],
186
+ [
187
+ false ,
188
+ $ this ->never (),
189
+ $ this ->never (),
190
+ '<error>The Client ID, Client Secret, Organization ID and 2FA Auth are required ' .
191
+ 'when enabling the Admin Adobe IMS Module</error> ' ,
192
+ false
193
+ ]
173
194
];
174
195
}
175
196
0 commit comments