public function SocialMinkContext::iShouldSeeCheckedTheBox in Open Social 10.1.x
Same name and namespace in other branches
- 8.9 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeCheckedTheBox()
- 8.3 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeCheckedTheBox()
- 8.4 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeCheckedTheBox()
- 8.5 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeCheckedTheBox()
- 8.6 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeCheckedTheBox()
- 8.7 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeCheckedTheBox()
- 8.8 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeCheckedTheBox()
- 10.3.x tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeCheckedTheBox()
- 10.0.x tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeCheckedTheBox()
- 10.2.x tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeCheckedTheBox()
@Then I should see checked the box :checkbox
File
- tests/
behat/ features/ bootstrap/ SocialMinkContext.php, line 163
Class
- SocialMinkContext
- Defines application features from the specific context.
Namespace
Drupal\social\BehatCode
public function iShouldSeeCheckedTheBox($checkbox) {
$checkbox = $this
->fixStepArgument($checkbox);
if (!$this
->getSession()
->getPage()
->hasCheckedField($checkbox)) {
$field = $this
->getSession()
->getPage()
->findField($checkbox);
if (null === $field) {
throw new \Exception(sprintf('The checkbox "%s" with id|name|label|value was not found', $checkbox));
}
else {
throw new \Exception(sprintf('The checkbox "%s" is not checked', $checkbox));
}
}
}