function UrlHelperTest::testUncompressExceededLengthLimit

Same name and namespace in other branches
  1. main core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::testUncompressExceededLengthLimit()

Tests decompressing a query parameter with data over the length limit.

File

core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php, line 158

Class

UrlHelperTest
Tests Drupal\Component\Utility\UrlHelper.

Namespace

Drupal\Tests\Component\Utility

Code

public function testUncompressExceededLengthLimit() : void {
  $data = str_repeat('a', 20000);
  $compressed = UrlHelper::compressQueryParameter($data);
  $this->assertSame($compressed, UrlHelper::uncompressQueryParameter($compressed));
}

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