You are here

public function GeneralTest::testAdvancedFormSecondSubmit in Zircon Profile 8

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

File

vendor/behat/mink/driver-testsuite/tests/Form/GeneralTest.php, line 271

Class

GeneralTest

Namespace

Behat\Mink\Tests\Driver\Form

Code

public function testAdvancedFormSecondSubmit() {
  $this
    ->getSession()
    ->visit($this
    ->pathTo('/advanced_form.html'));
  $page = $this
    ->getSession()
    ->getPage();
  $button = $page
    ->findButton('Login');
  $this
    ->assertNotNull($button);
  $button
    ->press();
  $toSearch = array(
    "'agreement' = 'off',",
    "'submit' = 'Login',",
    'no file',
  );
  $pageContent = $page
    ->getContent();
  foreach ($toSearch as $searchString) {
    $this
      ->assertContains($searchString, $pageContent);
  }
}