diff options
author | Mario <mario@mariovavti.com> | 2021-02-15 18:35:40 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-02-15 18:35:40 +0000 |
commit | 0cd4c3410121b9b584dc1b108e555832843b2576 (patch) | |
tree | adcac187c383120a255396d19a010f359c58e614 /vendor/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php | |
parent | 02401ea9fd5d53f590305c0f9834685cda58723d (diff) | |
download | volse-hubzilla-0cd4c3410121b9b584dc1b108e555832843b2576.tar.gz volse-hubzilla-0cd4c3410121b9b584dc1b108e555832843b2576.tar.bz2 volse-hubzilla-0cd4c3410121b9b584dc1b108e555832843b2576.zip |
compser update sabre/dav /vobject
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php')
-rw-r--r-- | vendor/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php b/vendor/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php deleted file mode 100644 index cb4d3ce03..000000000 --- a/vendor/sabre/dav/tests/Sabre/DAV/Browser/GuessContentTypeTest.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Sabre\DAV\Browser; - -use Sabre\DAV; - -class GuessContentTypeTest extends DAV\AbstractServer -{ - public function setUp(): void - { - parent::setUp(); - \Sabre\TestUtil::clearTempDir(); - file_put_contents(SABRE_TEMPDIR.'/somefile.jpg', 'blabla'); - file_put_contents(SABRE_TEMPDIR.'/somefile.hoi', 'blabla'); - } - - public function tearDown(): void - { - \Sabre\TestUtil::clearTempDir(); - parent::tearDown(); - } - - public function testGetProperties() - { - $properties = [ - '{DAV:}getcontenttype', - ]; - $result = $this->server->getPropertiesForPath('/somefile.jpg', $properties); - $this->assertArrayHasKey(0, $result); - $this->assertArrayHasKey(404, $result[0]); - $this->assertArrayHasKey('{DAV:}getcontenttype', $result[0][404]); - } - - /** - * @depends testGetProperties - */ - 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('{DAV:}getcontenttype', $result[0][200]); - $this->assertEquals('image/jpeg', $result[0][200]['{DAV:}getcontenttype']); - } - - /** - * @depends testGetPropertiesPluginEnabled - */ - public function testGetPropertiesUnknown() - { - $this->server->addPlugin(new GuessContentType()); - $properties = [ - '{DAV:}getcontenttype', - ]; - $result = $this->server->getPropertiesForPath('/somefile.hoi', $properties); - $this->assertArrayHasKey(0, $result); - $this->assertArrayHasKey(200, $result[0]); - $this->assertArrayHasKey('{DAV:}getcontenttype', $result[0][200]); - $this->assertEquals('application/octet-stream', $result[0][200]['{DAV:}getcontenttype']); - } -} |