protected function SkinrUIPluginTestCase::assertOptionExists in Skinr 8.2
Same name and namespace in other branches
- 7.2 tests/skinr_ui.test \SkinrUIPluginTestCase::assertOptionExists()
Asserts that a select option in the current page exists.
Parameters
$name: Id of select field to assert.
$option: Option to assert.
$message: Message to display.
Return value
TRUE on pass, FALSE on fail.
3 calls to SkinrUIPluginTestCase::assertOptionExists()
- SkinrUIPluginTestCase::testBlock in skinr_ui/
src/ Tests/ skinr_ui.test - Tests block plugin.
- SkinrUIPluginTestCase::testComment in skinr_ui/
src/ Tests/ skinr_ui.test - Tests comment plugin.
- SkinrUIPluginTestCase::testNode in skinr_ui/
src/ Tests/ skinr_ui.test - Tests node plugin.
File
- skinr_ui/
src/ Tests/ skinr_ui.test, line 554 - Tests for the Skinr UI module.
Class
- SkinrUIPluginTestCase
- Tests UI functionality for Block plugin.
Code
protected function assertOptionExists($name, $option, $message = '') {
$elements = $this
->xpath('//select[@name=:name]//option[@value=:option]', array(
':name' => $name,
':option' => $option,
));
return $this
->assertTrue(isset($elements[0]), $message ? $message : t('Option @option for field @name exists.', array(
'@option' => $option,
'@name' => $name,
)), t('Browser'));
}