You are here

public function SocialMinkContext::iShouldSeeUncheckedTheBox in Open Social 8.2

@Then I should see unchecked the box :checkbox

File

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

Class

SocialMinkContext
Defines application features from the specific context.

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));
    }
  }
}