You are here

BaseUrlTest.php in Zircon Profile 8.0

Same filename and directory in other branches
  1. 8 vendor/behat/mink-browserkit-driver/tests/Custom/BaseUrlTest.php

File

vendor/behat/mink-browserkit-driver/tests/Custom/BaseUrlTest.php
View source
<?php

namespace Behat\Mink\Tests\Driver\Custom;

use Behat\Mink\Driver\BrowserKitDriver;
use Behat\Mink\Session;
use Symfony\Component\HttpKernel\Client;

/**
 * @group functional
 */
class BaseUrlTest extends \PHPUnit_Framework_TestCase {
  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());
  }

}

Classes

Namesort descending Description
BaseUrlTest @group functional