You are here

public function SocialMinkContext::iShouldSeeUncheckedTheBox in Open Social 8.7

Same name and namespace in other branches
  1. 8.9 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeUncheckedTheBox()
  2. 8.3 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeUncheckedTheBox()
  3. 8.4 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeUncheckedTheBox()
  4. 8.5 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeUncheckedTheBox()
  5. 8.6 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeUncheckedTheBox()
  6. 8.8 tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeUncheckedTheBox()
  7. 10.3.x tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeUncheckedTheBox()
  8. 10.0.x tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeUncheckedTheBox()
  9. 10.1.x tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeUncheckedTheBox()
  10. 10.2.x tests/behat/features/bootstrap/SocialMinkContext.php \Drupal\social\Behat\SocialMinkContext::iShouldSeeUncheckedTheBox()

@Then I should see unchecked the box :checkbox

File

tests/behat/features/bootstrap/SocialMinkContext.php, line 143

Class

SocialMinkContext
Defines application features from the specific context.

Namespace

Drupal\social\Behat

Code

public function iShouldSeeUncheckedTheBox($checkbox) {
  $checkbox = $this
    ->fixStepArgument($checkbox);
  if (!$this
    ->getSession()
    ->getPage()
    ->hasUncheckedField($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 checked', $checkbox));
    }
  }
}