Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / behat / mink-browserkit-driver / tests / Custom / BaseUrlTest.php
1 <?php
2
3 namespace Behat\Mink\Tests\Driver\Custom;
4
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;
10
11 /**
12  * @group functional
13  */
14 class BaseUrlTest extends TestCase
15 {
16     public function testBaseUrl()
17     {
18         $client = new Client(new FixturesKernel());
19         $driver = new BrowserKitDriver($client, 'http://localhost/foo/');
20         $session = new Session($driver);
21
22         $session->visit('http://localhost/foo/index.html');
23         $this->assertEquals(200, $session->getStatusCode());
24         $this->assertEquals('http://localhost/foo/index.html', $session->getCurrentUrl());
25     }
26 }