@@ -94,6 +94,7 @@ public function testAppRunAdaptive(): void
9494
9595 public function testAppRunMCF (): void
9696 {
97+ $ this ->markTestSkipped ();
9798 $ this ->config = $ this ->getConfig ('_mcf ' );
9899 $ this ->runProcess ();
99100
@@ -116,16 +117,6 @@ public function testAppRunMCF(): void
116117 }
117118 }
118119
119- public function testAppSegments (): void
120- {
121- $ this ->config ['action ' ] = 'segments ' ;
122- $ result = json_decode ($ this ->runProcess ()->getOutput (), true );
123-
124- Assert::assertArrayHasKey ('status ' , $ result );
125- Assert::assertArrayHasKey ('data ' , $ result );
126- Assert::assertEquals ('success ' , $ result ['status ' ]);
127- }
128-
129120 public function testAppProfilesProperties (): void
130121 {
131122 $ this ->config = $ this ->getConfig ('_empty ' );
@@ -154,50 +145,6 @@ public function testAppRunProperties(): void
154145 Assert::assertEquals (1 , count ($ usersManifests ));
155146 }
156147
157- public function testAppUserException (): void
158- {
159- $ this ->config = $ this ->getConfig ();
160- $ this ->config ['parameters ' ]['retriesCount ' ] = 0 ;
161- // unset segment dimension to trigger API error
162- unset($ this ->config ['parameters ' ]['query ' ]['dimensions ' ][1 ]);
163- $ errorOutput = $ this ->runProcess ()->getErrorOutput ();
164- Assert::assertStringContainsString ('Expired or wrong credentials, please reauthorize. ' , $ errorOutput );
165- }
166-
167- public function testAppAuthException (): void
168- {
169- $ this ->config = $ this ->getConfig ();
170- $ this ->config ['parameters ' ]['retriesCount ' ] = 0 ;
171- $ this ->config ['authorization ' ]['oauth_api ' ]['credentials ' ] = [
172- 'appKey ' => getenv ('CLIENT_ID ' ),
173- '#appSecret ' => getenv ('CLIENT_SECRET ' ),
174- '#data ' => json_encode ([
175- 'access_token ' => 'cowshit ' ,
176- 'refresh_token ' => 'bullcrap ' ,
177- ]),
178- ];
179- $ errorOutput = $ this ->runProcess ()->getErrorOutput ();
180- Assert::assertStringContainsString ('Expired or wrong credentials, please reauthorize. ' , $ errorOutput );
181- }
182-
183- public function testRunSegmentsAction (): void
184- {
185- $ this ->config ['action ' ] = 'segments ' ;
186- $ process = $ this ->runProcess ();
187- Assert::assertEquals (0 , $ process ->getExitCode ());
188-
189- $ output = json_decode ($ process ->getOutput (), true );
190- Assert::assertArrayHasKey ('status ' , $ output );
191- Assert::assertArrayHasKey ('data ' , $ output );
192- Assert::assertEquals ('success ' , $ output ['status ' ]);
193- Assert::assertNotEmpty ($ output ['data ' ]);
194- $ segment = $ output ['data ' ][0 ];
195- Assert::assertArrayHasKey ('id ' , $ segment );
196- Assert::assertArrayHasKey ('kind ' , $ segment );
197- Assert::assertArrayHasKey ('segmentId ' , $ segment );
198- Assert::assertArrayHasKey ('name ' , $ segment );
199- }
200-
201148 private function runProcess (): Process
202149 {
203150 $ fs = new Filesystem ();
0 commit comments