From 580c3f4ffe9608d2beb56d418c68b3b112420e76 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 10 Nov 2019 12:49:51 +0000 Subject: another bulk of composer updates (cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce) --- .../Sabre/DAV/PartialUpdate/SpecificationTest.php | 40 ++++++++++------------ 1 file changed, 18 insertions(+), 22 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php') diff --git a/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php b/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php index 2c6274173..56b2d576f 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php @@ -1,5 +1,7 @@ debugExceptions = true; @@ -28,32 +30,30 @@ class SpecificationTest extends \PHPUnit_Framework_TestCase { $tree[0]->put('1234567890'); $this->server = $server; - } - function tearDown() { - + public function tearDown() + { \Sabre\TestUtil::clearTempDir(); - } /** * @param string $headerValue * @param string $httpStatus * @param string $endResult - * @param int $contentLength + * @param int $contentLength * * @dataProvider data */ - function testUpdateRange($headerValue, $httpStatus, $endResult, $contentLength = 4) { - + public function testUpdateRange($headerValue, $httpStatus, $endResult, $contentLength = 4) + { $headers = [ - 'Content-Type' => 'application/x-sabredav-partialupdate', + 'Content-Type' => 'application/x-sabredav-partialupdate', 'X-Update-Range' => $headerValue, ]; if ($contentLength) { - $headers['Content-Length'] = (string)$contentLength; + $headers['Content-Length'] = (string) $contentLength; } $request = new HTTP\Request('PATCH', '/foobar.txt', $headers, '----'); @@ -64,15 +64,14 @@ class SpecificationTest extends \PHPUnit_Framework_TestCase { $this->server->sapi = new HTTP\SapiMock(); $this->server->exec(); - $this->assertEquals($httpStatus, $this->server->httpResponse->status, 'Incorrect http status received: ' . $this->server->httpResponse->body); + $this->assertEquals($httpStatus, $this->server->httpResponse->status, 'Incorrect http status received: '.$this->server->httpResponse->body); if (!is_null($endResult)) { - $this->assertEquals($endResult, file_get_contents(SABRE_TEMPDIR . '/foobar.txt')); + $this->assertEquals($endResult, file_get_contents(SABRE_TEMPDIR.'/foobar.txt')); } - } - function data() { - + public function data() + { return [ // Problems ['foo', 400, null], @@ -86,9 +85,6 @@ class SpecificationTest extends \PHPUnit_Framework_TestCase { ['bytes=-2', 204, '12345678----'], ['bytes=2-', 204, '12----7890'], ['append', 204, '1234567890----'], - ]; - } - } -- cgit v1.2.3