/**
* Tests the standard profile configuration for media type 'remote_video'.
*/
protected function remoteVideoTest() { $assert_session =
$this->
assertSession();
$page =
$this->
getSession()->
getPage();
$source_field_id = 'field_media_oembed_video';
// Set video fixtures.
$video_title = 'Drupal Rap Video - Schipulcon09';
$video_url = 'https://vimeo.com/7073899';
ResourceController::
setResourceUrl($video_url,
$this->
getFixturesDirectory() . '/video_vimeo.json'
);
$video_title_updated = "Everyday I'm Drupalin' Drupal Rap (Rick Ross - Hustlin)";
$video_url_updated = 'https://www.youtube.com/watch?v=PWjcqE3QKBg';
ResourceController::
setResourceUrl($video_url_updated,
$this->
getFixturesDirectory() . '/video_youtube.json'
);
// Check if the name field is properly hidden on the media form.
$this->
drupalGet('media/add/remote_video'
);
$assert_session->
fieldNotExists('name'
);
// Check if the source field is available.
$assert_session->
fieldExists("{
$source_field_id}[0][value]"
);