You are here

public function BaseUrlTest::testBaseUrl in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink-browserkit-driver/tests/Custom/BaseUrlTest.php \Behat\Mink\Tests\Driver\Custom\BaseUrlTest::testBaseUrl()

File

vendor/behat/mink-browserkit-driver/tests/Custom/BaseUrlTest.php, line 14

Class

BaseUrlTest
@group functional

Namespace

Behat\Mink\Tests\Driver\Custom

Code

public function testBaseUrl() {
  $client = new Client(require __DIR__ . '/../app.php');
  $driver = new BrowserKitDriver($client, 'http://localhost/foo/');
  $session = new Session($driver);
  $session
    ->visit('http://localhost/foo/index.html');
  $this
    ->assertEquals(200, $session
    ->getStatusCode());
  $this
    ->assertEquals('http://localhost/foo/index.html', $session
    ->getCurrentUrl());
}