diff options
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php b/vendor/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php index 2d57c6ae7..4e3276ed3 100644 --- a/vendor/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php +++ b/vendor/sabre/dav/tests/Sabre/CardDAV/MultiGetTest.php @@ -1,5 +1,7 @@ <?php +declare(strict_types=1); + namespace Sabre\CardDAV; use Sabre\DAV; @@ -7,13 +9,13 @@ use Sabre\HTTP; require_once 'Sabre/HTTP/ResponseMock.php'; -class MultiGetTest extends AbstractPluginTest { - - function testMultiGet() { - +class MultiGetTest extends AbstractPluginTest +{ + public function testMultiGet() + { $request = HTTP\Sapi::createFromServerArray([ 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/addressbooks/user1/book1', + 'REQUEST_URI' => '/addressbooks/user1/book1', ]); $request->setBody( @@ -34,7 +36,7 @@ class MultiGetTest extends AbstractPluginTest { $this->server->exec(); - $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:' . $response->body); + $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:'.$response->body); // using the client for parsing $client = new DAV\Client(['baseUri' => '/']); @@ -44,19 +46,18 @@ class MultiGetTest extends AbstractPluginTest { $this->assertEquals([ '/addressbooks/user1/book1/card1' => [ 200 => [ - '{DAV:}getetag' => '"' . md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") . '"', + '{DAV:}getetag' => '"'.md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD").'"', '{urn:ietf:params:xml:ns:carddav}address-data' => "BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD", - ] - ] + ], + ], ], $result); - } - function testMultiGetVCard4() { - + public function testMultiGetVCard4() + { $request = HTTP\Sapi::createFromServerArray([ 'REQUEST_METHOD' => 'REPORT', - 'REQUEST_URI' => '/addressbooks/user1/book1', + 'REQUEST_URI' => '/addressbooks/user1/book1', ]); $request->setBody( @@ -77,23 +78,22 @@ class MultiGetTest extends AbstractPluginTest { $this->server->exec(); - $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:' . $response->body); + $this->assertEquals(207, $response->status, 'Incorrect status code. Full response body:'.$response->body); // using the client for parsing $client = new DAV\Client(['baseUri' => '/']); $result = $client->parseMultiStatus($response->body); - $prodId = "PRODID:-//Sabre//Sabre VObject " . \Sabre\VObject\Version::VERSION . "//EN"; + $prodId = 'PRODID:-//Sabre//Sabre VObject '.\Sabre\VObject\Version::VERSION.'//EN'; $this->assertEquals([ '/addressbooks/user1/book1/card1' => [ 200 => [ - '{DAV:}getetag' => '"' . md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD") . '"', + '{DAV:}getetag' => '"'.md5("BEGIN:VCARD\nVERSION:3.0\nUID:12345\nEND:VCARD").'"', '{urn:ietf:params:xml:ns:carddav}address-data' => "BEGIN:VCARD\r\nVERSION:4.0\r\n$prodId\r\nUID:12345\r\nEND:VCARD\r\n", - ] - ] + ], + ], ], $result); - } } |