3 namespace Behat\Mink\Tests\Driver\Custom;
5 use Behat\Mink\Driver\BrowserKitDriver;
6 use Behat\Mink\Session;
7 use Behat\Mink\Tests\Driver\Util\FixturesKernel;
8 use PHPUnit\Framework\TestCase;
9 use Symfony\Component\HttpKernel\Client;
14 class BaseUrlTest extends TestCase
16 public function testBaseUrl()
18 $client = new Client(new FixturesKernel());
19 $driver = new BrowserKitDriver($client, 'http://localhost/foo/');
20 $session = new Session($driver);
22 $session->visit('http://localhost/foo/index.html');
23 $this->assertEquals(200, $session->getStatusCode());
24 $this->assertEquals('http://localhost/foo/index.html', $session->getCurrentUrl());