public function testWidgetOEmbed() { $this->
hijackProviderEndpoints();
$assert_session =
$this->
assertSession();
$page =
$this->
getSession()->
getPage();
$youtube_title = "Everyday I'm Drupalin' Drupal Rap (Rick Ross - Hustlin)";
$youtube_url = 'https://www.youtube.com/watch?v=PWjcqE3QKBg';
$vimeo_title = "Drupal Rap Video - Schipulcon09";
$vimeo_url = 'https://vimeo.com/7073899';
ResourceController::
setResourceUrl($youtube_url,
$this->
getFixturesDirectory() . '/video_youtube.json'
);
ResourceController::
setResourceUrl($vimeo_url,
$this->
getFixturesDirectory() . '/video_vimeo.json'
);
ResourceController::
setResource404('https://www.youtube.com/watch?v=PWjcqE3QKBg1'
);
// Visit a node create page.
$this->
drupalGet('node/add/basic_page'
);
// Add to the unlimited media field.
$this->
openMediaLibraryForField('field_unlimited_media'
);
// Assert the default tab for media type one does not have an oEmbed form.
$assert_session->
fieldNotExists('Add Type Five via URL'
);
// Assert other media types don't have the oEmbed form fields.