You are here

public function BasicAuthTest::testSetBasicAuth in Zircon Profile 8

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

@dataProvider setBasicAuthDataProvider

File

vendor/behat/mink/driver-testsuite/tests/Basic/BasicAuthTest.php, line 12

Class

BasicAuthTest

Namespace

Behat\Mink\Tests\Driver\Basic

Code

public function testSetBasicAuth($user, $pass, $pageText) {
  $session = $this
    ->getSession();
  $session
    ->setBasicAuth($user, $pass);
  $session
    ->visit($this
    ->pathTo('/basic_auth.php'));
  $this
    ->assertContains($pageText, $session
    ->getPage()
    ->getContent());
}