Fix #1680 : Add support for custom extension to mime-type mapping

This commit is contained in:
Romain Neutron
2014-02-13 12:20:41 +01:00
parent aa914b4c13
commit 9aa4e7abd8
7 changed files with 115 additions and 14 deletions

View File

@@ -0,0 +1,19 @@
<?php
namespace Alchemy\Tests\Phrasea\Border;
use Alchemy\Phrasea\Border\CustomExtensionGuesser;
class CustomExtensionGuesserTest extends \PhraseanetPHPUnitAbstract
{
public function testGuess()
{
$conf = array(
'mpeg' => 'video/x-romain-neutron',
);
$guesser = new CustomExtensionGuesser($conf);
$this->assertNull($guesser->guess(__FILE__));
$this->assertEquals('video/x-romain-neutron', $guesser->guess('/path/to/video.mpeg'));
}
}