Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403]

(no description)

File Size: 489 lines (20 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 lib/tests/fixtures/testable_core_media_player.php

Defines 1 class


Class: medialib_test  - X-Ref

Test classes for handling embedded media (audio/video).

setUp()   X-Ref
Pre-test setup. Preserves $CFG.


pretend_to_be_safari()   X-Ref
Sets user agent to Safari.


pretend_to_be_firefox()   X-Ref
Sets user agent to Firefox.


test_get_filename()   X-Ref
Test for core_media::get_filename.


test_get_extension()   X-Ref
Test for core_media::get_extension.


test_list_supported_urls()   X-Ref
Test for the core_media_player list_supported_urls.


test_get_players()   X-Ref
Test for get_players


test_can_embed_url()   X-Ref
Test for can_embed_url


test_embed_url_fallbacks()   X-Ref
Test for embed_url.
Checks multiple format/fallback support.


test_embed_url_swf()   X-Ref
Test for embed_url.
SWF shouldn't be converted to objects because media_swf has been removed.


test_slash_arguments()   X-Ref
Same as test_embed_url MP3 test, but for slash arguments.


test_embed_or_blank()   X-Ref
Test for embed_url.
Checks the EMBED_OR_BLANK option.


test_embed_url_size()   X-Ref
Test for embed_url.
Checks that size is passed through correctly to player objects and tests
size support in html5video output.


test_embed_url_name()   X-Ref
Test for embed_url.
Checks that name is passed through correctly to player objects and tests
name support in html5video output.


test_split_alternatives()   X-Ref
Test for split_alternatives.


test_embed_alternatives()   X-Ref
Test for embed_alternatives (with multiple urls)


test_initialise()   X-Ref
Make sure the instance() method returns singleton for the same page and different object for another page


get_players_test($manager)   X-Ref
Access list of players as string, shortening it by getting rid of
repeated text.

param: core_media_manager $manager The core_media_manager instance
return: string Comma-separated list of players