You are here

function MediaInternetBrowserWebTabTestCase::testMediaBrowserWebTab in D7 Media 7.3

Same name and namespace in other branches
  1. 7.4 modules/media_internet/tests/media_internet.test \MediaInternetBrowserWebTabTestCase::testMediaBrowserWebTab()
  2. 7.2 modules/media_internet/tests/media_internet.test \MediaInternetBrowserWebTabTestCase::testMediaBrowserWebTab()

Tests that the views sorting works on the media browser 'Library' tab.

File

modules/media_internet/tests/media_internet.test, line 100
Tests for media_internet.module.

Class

MediaInternetBrowserWebTabTestCase
Tests the media browser 'Web' tab.

Code

function testMediaBrowserWebTab() {

  // Load only the 'Library' tab of the media browser.
  $options = array(
    'query' => array(
      'enabledPlugins' => array(
        'media_internet' => 'media_internet',
      ),
    ),
  );
  $this
    ->drupalGet('media/browser', $options);
  $this
    ->assertResponse(200);

  // Check that the web tab is available and has an 'embed code' field.
  $this
    ->assertRaw(t('Web'), t('The web tab was found.'));
  $this
    ->assertFieldByName('embed_code', '', t('Embed code form field found.'));
}