File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed
tests/acceptance/features Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,17 @@ public function theAdministratorGetsTheUsersInTheGroupUsingTheOccCommand($groupN
255
255
);
256
256
}
257
257
258
+ /**
259
+ * @When the administrator gets the groups using the occ command
260
+ *
261
+ * @return void
262
+ */
263
+ public function theAdministratorGetsTheGroupsUsingTheOccCommand () {
264
+ $ this ->featureContext ->invokingTheCommand (
265
+ "group:list --output=json "
266
+ );
267
+ }
268
+
258
269
/**
259
270
* @When the administrator disables the app :appName using the occ command
260
271
*
@@ -394,6 +405,22 @@ public function theUsersReturnedByTheOccCommandShouldBe(TableNode $useridTable)
394
405
}
395
406
}
396
407
408
+ /**
409
+ * @Then the groups returned by the occ command should be
410
+ *
411
+ * @param TableNode $groupTableNode with group name with header group
412
+ *
413
+ * @return void
414
+ */
415
+ public function theGroupsReturnedByTheOccCommandShouldBe (TableNode $ groupTableNode ) {
416
+ $ lastOutput = $ this ->featureContext ->getStdOutOfOccCommand ();
417
+ $ lastOutputGroups = \json_decode ($ lastOutput , true );
418
+
419
+ foreach ($ groupTableNode as $ row ) {
420
+ PHPUnit_Framework_Assert::assertContains ($ row ['group ' ], $ lastOutputGroups );
421
+ }
422
+ }
423
+
397
424
/**
398
425
* This will run before EVERY scenario.
399
426
* It will set the properties for this object.
Original file line number Diff line number Diff line change
1
+ @cli @skipOnLDAP
2
+ Feature : get groups
3
+ As an admin
4
+ I want to be able to get groups
5
+ So that I can see all the groups in my ownCloud
6
+
7
+ Scenario : admin gets all the groups
8
+ Given group "0" has been created
9
+ And group "new-group" has been created
10
+ And group "España" has been created
11
+ When the administrator gets the groups using the occ command
12
+ Then the command should have been successful
13
+ And the groups returned by the occ command should be
14
+ | group |
15
+ | Espa ña |
16
+ | admin |
17
+ | new -group |
18
+ | 0 |
You can’t perform that action at this time.
0 commit comments