public function TestSubContext::assertNotSeeRadioById in Panopoly 7
Same name and namespace in other branches
- 8.2 modules/panopoly/panopoly_test/behat/steps/panopoly_test.behat.inc \TestSubContext::assertNotSeeRadioById()
@Then I should not see the radio button :field with the id :id @Then I should not see the radio button :field
File
- modules/
panopoly/ panopoly_test/ behat/ steps/ panopoly_test.behat.inc, line 991 - Provide Behat step-definitions for generic Panopoly tests.
Class
Code
public function assertNotSeeRadioById($field, $id = FALSE) {
$element = $this
->getSession()
->getPage();
$radiobutton = $id ? $element
->findById($id) : $element
->find('named', array(
'radio',
$this
->getSession()
->getSelectorsHandler()
->xpathLiteral($field),
));
if ($radiobutton !== NULL) {
throw new \Exception(sprintf('The radio button with "%s" was found on the page %s', $id ? $id : $field, $this
->getSession()
->getCurrentUrl()));
}
}