public function DrupalMinkClientTest::testFollowMetaRefresh in Drupal 8
@dataProvider getTestsForMetaRefresh @covers ::getMetaRefreshUrl
File
- core/
tests/ Drupal/ BuildTests/ Framework/ Tests/ DrupalMinkClientTest.php, line 24
Class
Namespace
Drupal\BuildTests\Framework\TestsCode
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());
}