ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMimeTypeTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
23 
24 class ilMimeTypeTest extends TestCase
25 {
27  {
28  $expected = 'video/youtube';
29  $actual = MimeType::lookupMimeType(
30  'https://www.youtube.com/watch?v=WSgP85kr6eU',
31  MimeType::APPLICATION__OCTET_STREAM
32  );
33 
34  $this->assertEquals($expected, $actual);
35  }
36 
37 
39  {
40  $expected = 'video/vimeo';
41  $actual = MimeType::lookupMimeType(
42  'https://vimeo.com/180157999',
43  MimeType::APPLICATION__OCTET_STREAM
44  );
45 
46  $this->assertEquals($expected, $actual);
47  }
48 }
testMimeTypeForVimeoUrlCouldBeCorrectlyDetected()
testMimeTypeForYoutubeUrlCouldBeCorrectlyDetected()