You are here

function FormatFormViewModesTest::assertNoOption in D7 Media 7.2

Same name and namespace in other branches
  1. 7.4 modules/media_wysiwyg/media_wysiwyg.test \FormatFormViewModesTest::assertNoOption()
  2. 7.3 modules/media_wysiwyg/media_wysiwyg.test \FormatFormViewModesTest::assertNoOption()

Assert that a select option in the current page does not exist.

Parameters

$id: id of select field to assert.

$option: Option to assert.

1 call to FormatFormViewModesTest::assertNoOption()
FormatFormViewModesTest::testAllowedFormatFormViewModes in modules/media_wysiwyg/media_wysiwyg.test
Configure format form view mode restrictions and ensure that they are followed.

File

modules/media_wysiwyg/media_wysiwyg.test, line 185
Tests for media.module.

Class

FormatFormViewModesTest
Test configuring view modes available on the format form.

Code

function assertNoOption($id, $option, $message = '', $group = 'Browser') {
  $options = $this
    ->xpath('//select[@id=:id]/option[@value=:option]', array(
    ':id' => $id,
    ':option' => $option,
  ));
  return $this
    ->assertFalse(isset($options[0]), $message ? $message : t('Option @option for field @id does not exist.', array(
    '@option' => $option,
    '@id' => $id,
  )));
}