You are here

public function EntityUrlTest::providerTestToUrlUriCallback in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php \Drupal\Tests\Core\Entity\EntityUrlTest::providerTestToUrlUriCallback()

Provides data for testToUrlUriCallback().

Return value

array An array of test cases for testToUrlUriCallback().

File

core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php, line 369

Class

EntityUrlTest
Tests URL handling of the \Drupal\Core\Entity\Entity class.

Namespace

Drupal\Tests\Core\Entity

Code

public function providerTestToUrlUriCallback() {
  $test_cases = [];
  $uri_callback = function () {
    return Url::fromRoute('<none>');
  };
  $test_cases['uri_callback'] = [
    [],
    $uri_callback,
  ];
  $test_cases['bundle_uri_callback'] = [
    [
      'uri_callback' => $uri_callback,
    ],
    NULL,
  ];
  return $test_cases;
}