You are here

public function ChangeEventTest::testUncheckChangeEvent in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/driver-testsuite/tests/Js/ChangeEventTest.php \Behat\Mink\Tests\Driver\Js\ChangeEventTest::testUncheckChangeEvent()

@dataProvider checkboxTestWayDataProvider @group change-event-detector

File

vendor/behat/mink/driver-testsuite/tests/Js/ChangeEventTest.php, line 123

Class

ChangeEventTest
@group slow

Namespace

Behat\Mink\Tests\Driver\Js

Code

public function testUncheckChangeEvent($useSetValue) {
  $this
    ->getSession()
    ->visit($this
    ->pathTo('/element_change_detector.html'));
  $page = $this
    ->getSession()
    ->getPage();
  $checkbox = $this
    ->findById('the-checked-checkbox');
  $this
    ->assertNull($page
    ->findById('the-checked-checkbox-result'));
  if ($useSetValue) {
    $checkbox
      ->setValue(false);
  }
  else {
    $checkbox
      ->uncheck();
  }
  $this
    ->assertElementChangeCount('the-checked-checkbox');
}