diff options
Diffstat (limited to 'build/integration/features/bootstrap')
9 files changed, 29 insertions, 29 deletions
diff --git a/build/integration/features/bootstrap/AppConfiguration.php b/build/integration/features/bootstrap/AppConfiguration.php index 23ce2f89d04..87ecce24659 100644 --- a/build/integration/features/bootstrap/AppConfiguration.php +++ b/build/integration/features/bootstrap/AppConfiguration.php @@ -96,7 +96,7 @@ trait AppConfiguration { * reset the configs before each scenario * @param BeforeScenarioScope $event */ - public function prepareParameters(BeforeScenarioScope $event){ + public function prepareParameters(BeforeScenarioScope $event) { $user = $this->currentUser; $this->currentUser = 'admin'; diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php index 03cdd58833e..6a42cc1915d 100644 --- a/build/integration/features/bootstrap/BasicStructure.php +++ b/build/integration/features/bootstrap/BasicStructure.php @@ -370,7 +370,7 @@ trait BasicStructure { private function getDataDirectory() { // Based on "runOcc" from CommandLine trait $args = ['config:system:get', 'datadirectory']; - $args = array_map(function($arg) { + $args = array_map(function ($arg) { return escapeshellarg($arg); }, $args); $args[] = '--no-ansi --no-warnings'; diff --git a/build/integration/features/bootstrap/CalDavContext.php b/build/integration/features/bootstrap/CalDavContext.php index 13794df851a..b7b099b9850 100644 --- a/build/integration/features/bootstrap/CalDavContext.php +++ b/build/integration/features/bootstrap/CalDavContext.php @@ -80,7 +80,7 @@ class CalDavContext implements \Behat\Behat\Context\Context { * @param string $calendar * @param string $endpoint */ - public function requestsCalendar($user, $calendar, $endpoint) { + public function requestsCalendar($user, $calendar, $endpoint) { $davUrl = $this->baseUrl . $endpoint . $calendar; $password = ($user === 'admin') ? 'admin' : '123456'; diff --git a/build/integration/features/bootstrap/CapabilitiesContext.php b/build/integration/features/bootstrap/CapabilitiesContext.php index f38ba17551a..9f778ea5b5a 100644 --- a/build/integration/features/bootstrap/CapabilitiesContext.php +++ b/build/integration/features/bootstrap/CapabilitiesContext.php @@ -42,7 +42,7 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext { * @Then /^fields of capabilities match with$/ * @param \Behat\Gherkin\Node\TableNode|null $formData */ - public function checkCapabilitiesResponse(\Behat\Gherkin\Node\TableNode $formData){ + public function checkCapabilitiesResponse(\Behat\Gherkin\Node\TableNode $formData) { $capabilitiesXML = simplexml_load_string($this->response->getBody())->data->capabilities; foreach ($formData->getHash() as $row) { diff --git a/build/integration/features/bootstrap/CardDavContext.php b/build/integration/features/bootstrap/CardDavContext.php index 2837634a9d5..3e79c41fd13 100644 --- a/build/integration/features/bootstrap/CardDavContext.php +++ b/build/integration/features/bootstrap/CardDavContext.php @@ -206,7 +206,7 @@ class CardDavContext implements \Behat\Behat\Context\Context { /** * @Given :user uploads the contact :fileName to the addressbook :addressbook */ - public function uploadsTheContactToTheAddressbook($user, $fileName, $addressBook) { + public function uploadsTheContactToTheAddressbook($user, $fileName, $addressBook) { $davUrl = $this->baseUrl . '/remote.php/dav/addressbooks/users/'.$user.'/'.$addressBook . '/' . $fileName; $password = ($user === 'admin') ? 'admin' : '123456'; @@ -239,7 +239,7 @@ class CardDavContext implements \Behat\Behat\Context\Context { /** * @When Exporting the picture of contact :fileName from addressbook :addressBook as user :user */ - public function whenExportingThePictureOfContactFromAddressbookAsUser($fileName, $addressBook, $user) { + public function whenExportingThePictureOfContactFromAddressbookAsUser($fileName, $addressBook, $user) { $davUrl = $this->baseUrl . '/remote.php/dav/addressbooks/users/'.$user.'/'.$addressBook . '/' . $fileName . '?photo=true'; $password = ($user === 'admin') ? 'admin' : '123456'; @@ -265,7 +265,7 @@ class CardDavContext implements \Behat\Behat\Context\Context { /** * @When Downloading the contact :fileName from addressbook :addressBook as user :user */ - public function whenDownloadingTheContactFromAddressbookAsUser($fileName, $addressBook, $user) { + public function whenDownloadingTheContactFromAddressbookAsUser($fileName, $addressBook, $user) { $davUrl = $this->baseUrl . '/remote.php/dav/addressbooks/users/'.$user.'/'.$addressBook . '/' . $fileName; $password = ($user === 'admin') ? 'admin' : '123456'; diff --git a/build/integration/features/bootstrap/CommandLine.php b/build/integration/features/bootstrap/CommandLine.php index 91aa7028821..85b5b1e7464 100644 --- a/build/integration/features/bootstrap/CommandLine.php +++ b/build/integration/features/bootstrap/CommandLine.php @@ -42,7 +42,7 @@ trait CommandLine { * @return int exit code */ public function runOcc($args = []) { - $args = array_map(function($arg) { + $args = array_map(function ($arg) { return escapeshellarg($arg); }, $args); $args[] = '--no-ansi'; diff --git a/build/integration/features/bootstrap/CommandLineContext.php b/build/integration/features/bootstrap/CommandLineContext.php index 5bb87c04a94..678cf40351f 100644 --- a/build/integration/features/bootstrap/CommandLineContext.php +++ b/build/integration/features/bootstrap/CommandLineContext.php @@ -42,14 +42,14 @@ class CommandLineContext implements \Behat\Behat\Context\Context { /** * @Given Maintenance mode is enabled */ - public function maintenanceModeIsEnabled() { + public function maintenanceModeIsEnabled() { $this->runOcc(['maintenance:mode', '--on']); } /** * @Then Maintenance mode is disabled */ - public function maintenanceModeIsDisabled() { + public function maintenanceModeIsDisabled() { $this->runOcc(['maintenance:mode', '--off']); } @@ -82,7 +82,7 @@ class CommandLineContext implements \Behat\Behat\Context\Context { return null; } - usort($foundPaths, function($a, $b) { + usort($foundPaths, function ($a, $b) { return $a['date'] - $b['date']; }); diff --git a/build/integration/features/bootstrap/FederationContext.php b/build/integration/features/bootstrap/FederationContext.php index d710b9e502d..dce62b16c0d 100644 --- a/build/integration/features/bootstrap/FederationContext.php +++ b/build/integration/features/bootstrap/FederationContext.php @@ -46,7 +46,7 @@ class FederationContext implements Context, SnippetAcceptingContext { * @param string $shareeUser * @param string $shareeServer "LOCAL" or "REMOTE" */ - public function federateSharing($sharerUser, $sharerServer, $sharerPath, $shareeUser, $shareeServer){ + public function federateSharing($sharerUser, $sharerServer, $sharerPath, $shareeUser, $shareeServer) { if ($shareeServer == "REMOTE"){ $shareWith = "$shareeUser@" . substr($this->remoteBaseUrl, 0, -4); } else { @@ -67,7 +67,7 @@ class FederationContext implements Context, SnippetAcceptingContext { * @param string $shareeUser * @param string $shareeServer "LOCAL" or "REMOTE" */ - public function federateGroupSharing($sharerUser, $sharerServer, $sharerPath, $shareeGroup, $shareeServer){ + public function federateGroupSharing($sharerUser, $sharerServer, $sharerPath, $shareeGroup, $shareeServer) { if ($shareeServer == "REMOTE"){ $shareWith = "$shareeGroup@" . substr($this->remoteBaseUrl, 0, -4); } else { @@ -83,7 +83,7 @@ class FederationContext implements Context, SnippetAcceptingContext { * @param string $user * @param string $server */ - public function acceptLastPendingShare($user, $server){ + public function acceptLastPendingShare($user, $server) { $previous = $this->usingServer($server); $this->asAn($user); $this->sendingToWith('GET', "/apps/files_sharing/api/v1/remote_shares/pending", null); diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php index b76e846191e..cc08470e987 100644 --- a/build/integration/features/bootstrap/Sharing.php +++ b/build/integration/features/bootstrap/Sharing.php @@ -266,7 +266,7 @@ trait Sharing { $shareWith = null, $publicUpload = null, $password = null, - $permissions = null){ + $permissions = null) { $fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/apps/files_sharing/api/v{$this->sharingApiVersion}/shares"; $client = new Client(); $options = [ @@ -311,7 +311,7 @@ trait Sharing { } } - public function isFieldInResponse($field, $contentExpected){ + public function isFieldInResponse($field, $contentExpected) { $data = simplexml_load_string($this->response->getBody())->data[0]; if ((string)$field == 'expiration'){ $contentExpected = date('Y-m-d', strtotime($contentExpected)) . " 00:00:00"; @@ -358,7 +358,7 @@ trait Sharing { * * @param string $filename */ - public function checkSharedFileInResponse($filename){ + public function checkSharedFileInResponse($filename) { Assert::assertEquals(true, $this->isFieldInResponse('file_target', "/$filename")); } @@ -367,7 +367,7 @@ trait Sharing { * * @param string $filename */ - public function checkSharedFileNotInResponse($filename){ + public function checkSharedFileNotInResponse($filename) { Assert::assertEquals(false, $this->isFieldInResponse('file_target', "/$filename")); } @@ -376,7 +376,7 @@ trait Sharing { * * @param string $user */ - public function checkSharedUserInResponse($user){ + public function checkSharedUserInResponse($user) { Assert::assertEquals(true, $this->isFieldInResponse('share_with', "$user")); } @@ -385,11 +385,11 @@ trait Sharing { * * @param string $user */ - public function checkSharedUserNotInResponse($user){ + public function checkSharedUserNotInResponse($user) { Assert::assertEquals(false, $this->isFieldInResponse('share_with', "$user")); } - public function isUserOrGroupInSharedData($userOrGroup, $permissions = null){ + public function isUserOrGroupInSharedData($userOrGroup, $permissions = null) { $data = simplexml_load_string($this->response->getBody())->data[0]; foreach($data as $element) { if ($element->share_with == $userOrGroup && ($permissions === null || $permissions == $element->permissions)){ @@ -406,7 +406,7 @@ trait Sharing { * @param string $user1 * @param string $user2 */ - public function assureFileIsShared($entry, $filepath, $user1, $user2, $withPerms = null, $permissions = null){ + public function assureFileIsShared($entry, $filepath, $user1, $user2, $withPerms = null, $permissions = null) { $fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/apps/files_sharing/api/v{$this->sharingApiVersion}/shares" . "?path=$filepath"; $client = new Client(); $options = []; @@ -435,7 +435,7 @@ trait Sharing { * @param string $user * @param string $group */ - public function assureFileIsSharedWithGroup($entry, $filepath, $user, $group, $withPerms = null, $permissions = null){ + public function assureFileIsSharedWithGroup($entry, $filepath, $user, $group, $withPerms = null, $permissions = null) { $fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/apps/files_sharing/api/v{$this->sharingApiVersion}/shares" . "?path=$filepath"; $client = new Client(); $options = []; @@ -460,7 +460,7 @@ trait Sharing { /** * @When /^Deleting last share$/ */ - public function deletingLastShare(){ + public function deletingLastShare() { $share_id = $this->lastShareData->data[0]->id; $url = "/apps/files_sharing/api/v{$this->sharingApiVersion}/shares/$share_id"; $this->sendingToWith("DELETE", $url, null); @@ -469,7 +469,7 @@ trait Sharing { /** * @When /^Getting info of last share$/ */ - public function gettingInfoOfLastShare(){ + public function gettingInfoOfLastShare() { $share_id = $this->lastShareData->data[0]->id; $url = "/apps/files_sharing/api/v{$this->sharingApiVersion}/shares/$share_id"; $this->sendingToWith("GET", $url, null); @@ -478,7 +478,7 @@ trait Sharing { /** * @Then /^last share_id is included in the answer$/ */ - public function checkingLastShareIDIsIncluded(){ + public function checkingLastShareIDIsIncluded() { $share_id = $this->lastShareData->data[0]->id; if (!$this->isFieldInResponse('id', $share_id)){ Assert::fail("Share id $share_id not found in response"); @@ -488,7 +488,7 @@ trait Sharing { /** * @Then /^last share_id is not included in the answer$/ */ - public function checkingLastShareIDIsNotIncluded(){ + public function checkingLastShareIDIsNotIncluded() { $share_id = $this->lastShareData->data[0]->id; if ($this->isFieldInResponse('id', $share_id)){ Assert::fail("Share id $share_id has been found in response"); @@ -499,7 +499,7 @@ trait Sharing { * @Then /^Share fields of last share match with$/ * @param TableNode|null $body */ - public function checkShareFields($body){ + public function checkShareFields($body) { if ($body instanceof TableNode) { $fd = $body->getRowsHash(); @@ -601,7 +601,7 @@ trait Sharing { * @param string $contentExpected * @param \SimpleXMLElement $returnedShare */ - private function assertFieldIsInReturnedShare(string $field, string $contentExpected, \SimpleXMLElement $returnedShare){ + private function assertFieldIsInReturnedShare(string $field, string $contentExpected, \SimpleXMLElement $returnedShare) { if ($contentExpected === 'IGNORE') { return; } |