function BlockAccessTestCase::assertNoOption in Block Access 7
Helper - asserts that a select option in the current page does not exist
4 calls to BlockAccessTestCase::assertNoOption()
- BlockAccessDisableTestCase::testUINotGranted in tests/
op_basic_disable.test - Test UI does not allow $user2 to do operation
- BlockAccessEnableTestCase::testUINotGranted in tests/
op_basic_enable.test - Test UI does not allow $user2 to do operation
- BlockAccessMoveTestCase::testUINotGranted in tests/
op_basic_move.test - Test UI does not allow $user2 to do operation
- BlockAccessRegionSpecificTestCase::testCannotAccessRegion in tests/
op_region.test - Test we can block $user1 access to a region
File
- tests/
common.test, line 159 - Tests for block_access - common methods
Class
- BlockAccessTestCase
- Tests for block_access - common methods
Code
function assertNoOption($name, $option, $msg = '') {
$elements = $this
->xpath('//select[@name=:name]//option[@value=:option]', array(
':name' => $name,
':option' => $option,
));
$msg = $msg ? $msg : t('Option %option for field %name does not exist', array(
'%option' => $option,
'%name' => $name,
));
return $this
->assertFalse(isset($elements[0]), $msg);
}