mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-05 03:40:01 -06:00
Merge pull request #2874 from owncloud/minor-local-api-test-changes
[tests-only] Minor local API test changes
This commit is contained in:
@@ -6,7 +6,7 @@ default:
|
||||
apiAccountsHashDifficulty:
|
||||
paths:
|
||||
- '%paths.base%/../features/apiAccountsHashDifficulty'
|
||||
context: &common_ldap_suite_context
|
||||
context:
|
||||
parameters:
|
||||
ldapAdminPassword: admin
|
||||
ldapUsersOU: TestUsers
|
||||
@@ -34,12 +34,7 @@ default:
|
||||
contexts:
|
||||
- SpacesContext:
|
||||
- OccContext:
|
||||
- FeatureContext: &common_feature_context_params
|
||||
baseUrl: http://localhost:8080
|
||||
adminUsername: admin
|
||||
adminPassword: admin
|
||||
regularUserPassword: 123456
|
||||
ocPath: apps/testing/api/v1/occ
|
||||
- FeatureContext: *common_feature_context_params
|
||||
- CapabilitiesContext:
|
||||
- ChecksumContext:
|
||||
- FavoritesContext:
|
||||
@@ -54,12 +49,7 @@ default:
|
||||
contexts:
|
||||
- ArchiverContext:
|
||||
- OccContext:
|
||||
- FeatureContext: &common_feature_context_params
|
||||
baseUrl: http://localhost:8080
|
||||
adminUsername: admin
|
||||
adminPassword: admin
|
||||
regularUserPassword: 123456
|
||||
ocPath: apps/testing/api/v1/occ
|
||||
- FeatureContext: *common_feature_context_params
|
||||
- CapabilitiesContext:
|
||||
- ChecksumContext:
|
||||
- FilesVersionsContext:
|
||||
|
||||
@@ -38,7 +38,7 @@ class ArchiverContext implements Context {
|
||||
/**
|
||||
* @var FeatureContext
|
||||
*/
|
||||
private $featureContext;
|
||||
private FeatureContext $featureContext;
|
||||
|
||||
/**
|
||||
* @BeforeScenario
|
||||
@@ -80,7 +80,6 @@ class ArchiverContext implements Context {
|
||||
case 'id':
|
||||
case 'ids':
|
||||
return 'id=' . $this->featureContext->getFileIdForPath($user, $resource);
|
||||
break;
|
||||
case 'path':
|
||||
case 'paths':
|
||||
return 'path=' . $resource;
|
||||
|
||||
@@ -34,7 +34,7 @@ class RevaContext implements Context {
|
||||
/**
|
||||
* @var FeatureContext
|
||||
*/
|
||||
private $featureContext;
|
||||
private FeatureContext $featureContext;
|
||||
|
||||
/**
|
||||
* @BeforeScenario
|
||||
|
||||
@@ -185,14 +185,14 @@ class SpacesContext implements Context {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSpaceByName(string $user, string $name): array {
|
||||
public function getSpaceByName(string $user, string $spaceName): array {
|
||||
$this->theUserListsAllHisAvailableSpacesUsingTheGraphApi($user);
|
||||
|
||||
$spaces = $this->getAvailableSpaces();
|
||||
Assert::assertIsArray($spaces[$name], "Space with name $name for user $user not found");
|
||||
Assert::assertNotEmpty($spaces[$name]["root"]["webDavUrl"], "WebDavUrl for space with name $name for user $user not found");
|
||||
Assert::assertIsArray($spaces[$spaceName], "Space with name $spaceName for user $user not found");
|
||||
Assert::assertNotEmpty($spaces[$spaceName]["root"]["webDavUrl"], "WebDavUrl for space with name $spaceName for user $user not found");
|
||||
|
||||
return $spaces[$name];
|
||||
return $spaces[$spaceName];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -604,7 +604,7 @@ class SpacesContext implements Context {
|
||||
*
|
||||
* @throws Exception|GuzzleException
|
||||
*/
|
||||
public function usertheSpaceShouldContainEntries(
|
||||
public function userTheSpaceShouldContainEntries(
|
||||
string $user,
|
||||
string $spaceName,
|
||||
string $shouldOrNot,
|
||||
|
||||
Reference in New Issue
Block a user