aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-11-10 12:49:51 +0000
committerMario <mario@mariovavti.com>2019-11-10 14:10:03 +0100
commit580c3f4ffe9608d2beb56d418c68b3b112420e76 (patch)
tree82335d01179ac361d3f547a4b8e8c598d302e9f3 /vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php
parentd22766f458a8539a40a57f3946459a9be1f21cd6 (diff)
downloadvolse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.gz
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.bz2
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.zip
another bulk of composer updates
(cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce)
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/DAV/PartialUpdate/SpecificationTest.php40
1 files changed, 18 insertions, 22 deletions
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 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\DAV\PartialUpdate;
use Sabre\DAV\FSExt\File;
@@ -12,14 +14,14 @@ use Sabre\HTTP;
*
* See: http://sabre.io/dav/http-patch/
*/
-class SpecificationTest extends \PHPUnit_Framework_TestCase {
-
+class SpecificationTest extends \PHPUnit\Framework\TestCase
+{
protected $server;
- function setUp() {
-
+ public function setUp()
+ {
$tree = [
- new File(SABRE_TEMPDIR . '/foobar.txt')
+ new File(SABRE_TEMPDIR.'/foobar.txt'),
];
$server = new Server($tree);
$server->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----'],
-
];
-
}
-
}