コード例 #1
0
ファイル: detection.php プロジェクト: evanjt/core
 public function testGetSecureMimeType()
 {
     $result = $this->detection->getSecureMimeType('image/svg+xml');
     $expected = 'text/plain';
     $this->assertEquals($expected, $result);
     $result = $this->detection->getSecureMimeType('image/png');
     $expected = 'image/png';
     $this->assertEquals($expected, $result);
 }
コード例 #2
0
ファイル: detection.php プロジェクト: rosarion/core
 public function testGetSecureMimeType()
 {
     $detection = new Detection(\OC::$server->getURLGenerator(), \OC::$configDir);
     $result = $detection->getSecureMimeType('image/svg+xml');
     $expected = 'text/plain';
     $this->assertEquals($expected, $result);
     $result = $detection->getSecureMimeType('image/png');
     $expected = 'image/png';
     $this->assertEquals($expected, $result);
 }