You are here

public function GeneralTest::testBasicGetForm in Zircon Profile 8.0

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

File

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

Class

GeneralTest

Namespace

Behat\Mink\Tests\Driver\Form

Code

public function testBasicGetForm() {
  $this
    ->getSession()
    ->visit($this
    ->pathTo('/basic_get_form.php'));
  $webAssert = $this
    ->getAssertSession();
  $page = $this
    ->getSession()
    ->getPage();
  $this
    ->assertEquals('Basic Get Form Page', $webAssert
    ->elementExists('css', 'h1')
    ->getText());
  $search = $webAssert
    ->fieldExists('q');
  $search
    ->setValue('some#query');
  $page
    ->pressButton('Find');
  $div = $webAssert
    ->elementExists('css', 'div');
  $this
    ->assertEquals('some#query', $div
    ->getText());
}