コード例 #1
0
ファイル: detection.php プロジェクト: evanjt/core
 public function testDetectPath()
 {
     $this->assertEquals('text/plain', $this->detection->detectPath('foo.txt'));
     $this->assertEquals('image/png', $this->detection->detectPath('foo.png'));
     $this->assertEquals('image/png', $this->detection->detectPath('foo.bar.png'));
     $this->assertEquals('application/octet-stream', $this->detection->detectPath('.png'));
     $this->assertEquals('application/octet-stream', $this->detection->detectPath('foo'));
     $this->assertEquals('application/octet-stream', $this->detection->detectPath(''));
 }
コード例 #2
0
ファイル: detection.php プロジェクト: rosarion/core
 public function testDetectPath()
 {
     $detection = new Detection(\OC::$server->getURLGenerator(), \OC::$configDir);
     $this->assertEquals('text/plain', $detection->detectPath('foo.txt'));
     $this->assertEquals('image/png', $detection->detectPath('foo.png'));
     $this->assertEquals('image/png', $detection->detectPath('foo.bar.png'));
     $this->assertEquals('application/octet-stream', $detection->detectPath('.png'));
     $this->assertEquals('application/octet-stream', $detection->detectPath('foo'));
     $this->assertEquals('application/octet-stream', $detection->detectPath(''));
 }