3 namespace Behat\Mink\Tests\Driver\Custom;
5 use Behat\Mink\Driver\BrowserKitDriver;
6 use Behat\Mink\Session;
7 use Symfony\Component\HttpKernel\Client;
12 class BaseUrlTest extends \PHPUnit_Framework_TestCase
14 public function testBaseUrl()
16 $client = new Client(require(__DIR__.'/../app.php'));
17 $driver = new BrowserKitDriver($client, 'http://localhost/foo/');
18 $session = new Session($driver);
20 $session->visit('http://localhost/foo/index.html');
21 $this->assertEquals(200, $session->getStatusCode());
22 $this->assertEquals('http://localhost/foo/index.html', $session->getCurrentUrl());