You are here

public function CookieTest::testIssue140 in Zircon Profile 8

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

test cookie decoding.

@group issue140

File

vendor/behat/mink/driver-testsuite/tests/Basic/CookieTest.php, line 14

Class

CookieTest

Namespace

Behat\Mink\Tests\Driver\Basic

Code

public function testIssue140() {
  $this
    ->getSession()
    ->visit($this
    ->pathTo('/issue140.php'));
  $this
    ->getSession()
    ->getPage()
    ->fillField('cookie_value', 'some:value;');
  $this
    ->getSession()
    ->getPage()
    ->pressButton('Set cookie');
  $this
    ->getSession()
    ->visit($this
    ->pathTo('/issue140.php?show_value'));
  $this
    ->assertEquals('some:value;', $this
    ->getSession()
    ->getCookie('tc'));
  $this
    ->assertEquals('some:value;', $this
    ->getSession()
    ->getPage()
    ->getText());
}