You are here

public function UrlHelperTest::providerTestExternalIsLocalInvalid 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::providerTestExternalIsLocalInvalid()

Provides invalid argument data for local external url detection.

See also

\Drupal\Tests\Component\Utility\UrlHelperTest::testExternalIsLocalInvalid()

File

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

Class

UrlHelperTest
@group Utility

Namespace

Drupal\Tests\Component\Utility

Code

public function providerTestExternalIsLocalInvalid() {
  return array(
    array(
      'http://example.com/foo',
      '',
    ),
    array(
      'http://example.com/foo',
      'bar',
    ),
    array(
      'http://example.com/foo',
      'http://',
    ),
    // Invalid destination urls.
    array(
      '',
      'http://example.com/foo',
    ),
    array(
      'bar',
      'http://example.com/foo',
    ),
    array(
      '/bar',
      'http://example.com/foo',
    ),
    array(
      'bar/',
      'http://example.com/foo',
    ),
    array(
      'http://',
      'http://example.com/foo',
    ),
  );
}