@@ -66,12 +66,12 @@ public function testCommandInput($appId, $groups, $statusCode, $output): void {
6666
6767 $ this ->commandTester ->execute ($ input );
6868
69- $ this ->assertContains ($ output , $ this ->commandTester ->getDisplay ());
69+ $ this ->assertStringContainsString ($ output , $ this ->commandTester ->getDisplay ());
7070 $ this ->assertSame ($ statusCode , $ this ->commandTester ->getStatusCode ());
7171 }
7272
7373 public function dataCommandInput (): array {
74- return [
74+ $ data = [
7575 [['admin_audit ' ], null , 0 , 'admin_audit enabled ' ],
7676 [['comments ' ], null , 0 , 'comments enabled ' ],
7777 [['invalid_app ' ], null , 1 , 'Could not download app invalid_app ' ],
@@ -83,16 +83,20 @@ public function dataCommandInput(): array {
8383 [['comments ' ], ['admin ' ], 1 , "comments can't be enabled for groups " ],
8484
8585 [['updatenotification ' ], ['admin ' ], 0 , 'updatenotification enabled for groups: admin ' ],
86- # TODO: not reliable due to dependency to appstore
87- # [['updatenotification', 'contacts'], ['admin'], 0, "updatenotification enabled for groups: admin\ncontacts enabled for groups: admin"],
8886 [['updatenotification ' , 'accessibility ' ], ['admin ' ], 0 , "updatenotification enabled for groups: admin \naccessibility enabled for groups: admin " ],
8987
9088 [['updatenotification ' ], ['admin ' , 'invalid_group ' ], 0 , 'updatenotification enabled for groups: admin ' ],
91- # TODO: not reliable due to dependency to appstore
92- # [['updatenotification', 'contacts'], ['admin', 'invalid_group'], 0, "updatenotification enabled for groups: admin\ncontacts enabled for groups: admin"],
93- # [['updatenotification', 'contacts', 'invalid_app'], ['admin', 'invalid_group'], 1, "updatenotification enabled for groups: admin\ncontacts enabled for groups: admin\nCould not download app invalid_app"],
9489 [['updatenotification ' , 'accessibility ' ], ['admin ' , 'invalid_group ' ], 0 , "updatenotification enabled for groups: admin \naccessibility enabled for groups: admin " ],
9590 [['updatenotification ' , 'accessibility ' , 'invalid_app ' ], ['admin ' , 'invalid_group ' ], 1 , "updatenotification enabled for groups: admin \naccessibility enabled for groups: admin \nCould not download app invalid_app " ],
9691 ];
92+
93+ if (getenv ('CI ' ) === false ) {
94+ /** Tests disabled on drone/ci due to appstore dependency */
95+ $ data [] = [['updatenotification ' , 'contacts ' ], ['admin ' ], 0 , "updatenotification enabled for groups: admin \ncontacts enabled for groups: admin " ];
96+ $ data [] = [['updatenotification ' , 'contacts ' ], ['admin ' , 'invalid_group ' ], 0 , "updatenotification enabled for groups: admin \ncontacts enabled for groups: admin " ];
97+ $ data [] = [['updatenotification ' , 'contacts ' , 'invalid_app ' ], ['admin ' , 'invalid_group ' ], 1 , "updatenotification enabled for groups: admin \ncontacts enabled for groups: admin \nCould not download app invalid_app " ];
98+ }
99+
100+ return $ data ;
97101 }
98102}
0 commit comments