public function EntityUrlTest::providerTestToUrlUriCallback in Drupal 9
Same name and namespace in other branches
- 8 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 370
Class
- EntityUrlTest
- Tests URL handling of the \Drupal\Core\Entity\EntityBase class.
Namespace
Drupal\Tests\Core\EntityCode
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;
}