diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-02-10 14:01:26 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-02-10 16:18:04 +0100 |
commit | 929648ce2c9d91d836a6edb121d563f46b8fc2b0 (patch) | |
tree | 05525c2c4b9534f3adf92627bb21008c4e1fcb52 /build/integration/features/bootstrap/CardDavContext.php | |
parent | b4ade766656a2032f33d56eb4a0f17bb128af722 (diff) | |
download | nextcloud-server-929648ce2c9d91d836a6edb121d563f46b8fc2b0.tar.gz nextcloud-server-929648ce2c9d91d836a6edb121d563f46b8fc2b0.zip |
Add integration tests for legacy DAV endpoints
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'build/integration/features/bootstrap/CardDavContext.php')
-rw-r--r-- | build/integration/features/bootstrap/CardDavContext.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/build/integration/features/bootstrap/CardDavContext.php b/build/integration/features/bootstrap/CardDavContext.php index 4ee882cc2e6..2dce688ab85 100644 --- a/build/integration/features/bootstrap/CardDavContext.php +++ b/build/integration/features/bootstrap/CardDavContext.php @@ -72,20 +72,21 @@ class CardDavContext implements \Behat\Behat\Context\Context { } catch (\GuzzleHttp\Exception\ClientException $e) {} } - /** - * @When :user requests addressbook :addressBook with statuscode :statusCode + * @When :user requests addressbook :addressBook with statuscode :statusCode on the endpoint :endpoint * @param string $user * @param string $addressBook * @param int $statusCode + * @param string $endpoint * @throws \Exception */ - public function requestsAddressbookWithStatuscode($user, $addressBook, $statusCode) { - $davUrl = $this->baseUrl . '/remote.php/dav/addressbooks/users/'.$addressBook; + public function requestsAddressbookWithStatuscodeOnTheEndpoint($user, $addressBook, $statusCode, $endpoint) { + $davUrl = $this->baseUrl . $endpoint . $addressBook; $password = ($user === 'admin') ? 'admin' : '123456'; try { - $this->response = $this->client->get( + $request = $this->client->createRequest( + 'PROPFIND', $davUrl, [ 'auth' => [ @@ -94,6 +95,7 @@ class CardDavContext implements \Behat\Behat\Context\Context { ], ] ); + $this->response = $this->client->send($request); } catch (\GuzzleHttp\Exception\ClientException $e) { $this->response = $e->getResponse(); } |