diff options
author | Mario <mario@mariovavti.com> | 2019-11-10 12:49:51 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-11-10 14:10:03 +0100 |
commit | 580c3f4ffe9608d2beb56d418c68b3b112420e76 (patch) | |
tree | 82335d01179ac361d3f547a4b8e8c598d302e9f3 /vendor/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php | |
parent | d22766f458a8539a40a57f3946459a9be1f21cd6 (diff) | |
download | volse-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/Browser/GuessContentTypeTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php index 54a3053ec..1f48256e0 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php @@ -1,29 +1,30 @@ <?php +declare(strict_types=1); + namespace Sabre\DAV\Browser; use Sabre\DAV; require_once 'Sabre/DAV/AbstractServer.php'; -class GuessContentTypeTest extends DAV\AbstractServer { - - function setUp() { - +class GuessContentTypeTest extends DAV\AbstractServer +{ + public function setUp() + { parent::setUp(); \Sabre\TestUtil::clearTempDir(); - file_put_contents(SABRE_TEMPDIR . '/somefile.jpg', 'blabla'); - file_put_contents(SABRE_TEMPDIR . '/somefile.hoi', 'blabla'); - + file_put_contents(SABRE_TEMPDIR.'/somefile.jpg', 'blabla'); + file_put_contents(SABRE_TEMPDIR.'/somefile.hoi', 'blabla'); } - function tearDown() { - + public function tearDown() + { \Sabre\TestUtil::clearTempDir(); parent::tearDown(); } - function testGetProperties() { - + public function testGetProperties() + { $properties = [ '{DAV:}getcontenttype', ]; @@ -31,31 +32,29 @@ class GuessContentTypeTest extends DAV\AbstractServer { $this->assertArrayHasKey(0, $result); $this->assertArrayHasKey(404, $result[0]); $this->assertArrayHasKey('{DAV:}getcontenttype', $result[0][404]); - } /** * @depends testGetProperties */ - function testGetPropertiesPluginEnabled() { - + public function testGetPropertiesPluginEnabled() + { $this->server->addPlugin(new GuessContentType()); $properties = [ '{DAV:}getcontenttype', ]; $result = $this->server->getPropertiesForPath('/somefile.jpg', $properties); $this->assertArrayHasKey(0, $result); - $this->assertArrayHasKey(200, $result[0], 'We received: ' . print_r($result, true)); + $this->assertArrayHasKey(200, $result[0], 'We received: '.print_r($result, true)); $this->assertArrayHasKey('{DAV:}getcontenttype', $result[0][200]); $this->assertEquals('image/jpeg', $result[0][200]['{DAV:}getcontenttype']); - } /** * @depends testGetPropertiesPluginEnabled */ - function testGetPropertiesUnknown() { - + public function testGetPropertiesUnknown() + { $this->server->addPlugin(new GuessContentType()); $properties = [ '{DAV:}getcontenttype', @@ -65,6 +64,5 @@ class GuessContentTypeTest extends DAV\AbstractServer { $this->assertArrayHasKey(200, $result[0]); $this->assertArrayHasKey('{DAV:}getcontenttype', $result[0][200]); $this->assertEquals('application/octet-stream', $result[0][200]['{DAV:}getcontenttype']); - } } |