function MediaElementSettingsTestCase::testElementSettings in D7 Media 7.2
Same name and namespace in other branches
- 7.4 tests/media.test \MediaElementSettingsTestCase::testElementSettings()
- 7.3 tests/media.test \MediaElementSettingsTestCase::testElementSettings()
Tests the media element type settings.
File
- tests/
media.test, line 884 - Tests for media.module.
Class
- MediaElementSettingsTestCase
- Tests the 'media' element type settings.
Code
function testElementSettings() {
$form = array(
'#type' => 'media',
);
drupal_render($form);
$javascript = drupal_get_js();
$global = array(
'media' => array(
'global' => array(
'global' => array(
'types' => array(),
'schemes' => array(),
),
),
),
);
$settings = drupal_json_encode(drupal_array_merge_deep_array($global));
$this
->assertTrue(strpos($javascript, $settings) > 0, 'Rendered media element adds the global settings.');
}