function DrupalMinkClientTest::testFollowMetaRefresh

@dataProvider getTestsForMetaRefresh @covers ::getMetaRefreshUrl

File

core/tests/Drupal/BuildTests/Framework/Tests/DrupalMinkClientTest.php, line 24

Class

DrupalMinkClientTest
Test \Drupal\BuildTests\Framework\DrupalMinkClient.

Namespace

Drupal\BuildTests\Framework\Tests

Code

public function testFollowMetaRefresh(string $content, string $expectedEndingUrl, bool $followMetaRefresh = TRUE) {
    $client = new TestClient();
    $client->followMetaRefresh($followMetaRefresh);
    $client->setNextResponse(new Response($content));
    $client->request('GET', 'http://www.example.com/foo/foobar');
    $this->assertEquals($expectedEndingUrl, $client->getRequest()
        ->getUri());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.