You are here

protected function UrlHelperTest::dataEnhanceWithScheme in Zircon Profile 8

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

Enhances test urls with schemes

Parameters

array $urls: The list of urls.

Return value

array A list of provider data with schemes.

2 calls to UrlHelperTest::dataEnhanceWithScheme()
UrlHelperTest::providerTestInvalidAbsolute in core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php
Provides data for testInvalidAbsolute().
UrlHelperTest::providerTestValidAbsoluteData in core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php
Data provider for testValidAbsolute().

File

core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php, line 452
Contains \Drupal\Tests\Component\Utility\UrlHelperTest.

Class

UrlHelperTest
@group Utility

Namespace

Drupal\Tests\Component\Utility

Code

protected function dataEnhanceWithScheme(array $urls) {
  $url_schemes = array(
    'http',
    'https',
    'ftp',
  );
  $data = array();
  foreach ($url_schemes as $scheme) {
    foreach ($urls as $url) {
      $data[] = array(
        $url,
        $scheme,
      );
    }
  }
  return $data;
}