diff --git a/core/lib/Drupal/Core/Routing/CachedUrlGenerator.php b/core/lib/Drupal/Core/Routing/CachedUrlGenerator.php index 597ebfa..1e634da 100644 --- a/core/lib/Drupal/Core/Routing/CachedUrlGenerator.php +++ b/core/lib/Drupal/Core/Routing/CachedUrlGenerator.php @@ -9,9 +9,6 @@ use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\DestructableInterface; -use Drupal\Core\Language\Language; -use Drupal\Core\Language\LanguageManagerInterface; -use Drupal\Core\Routing\RouteMatchInterface; use Symfony\Cmf\Component\Routing\RouteProviderInterface as SymfonyRouteProviderInterface; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Routing\Exception\RouteNotFoundException; diff --git a/core/tests/Drupal/Tests/Core/Routing/CachedUrlGeneratorIntegrationTest.php b/core/tests/Drupal/Tests/Core/Routing/CachedUrlGeneratorIntegrationTest.php new file mode 100644 index 0000000..b0ef018 --- /dev/null +++ b/core/tests/Drupal/Tests/Core/Routing/CachedUrlGeneratorIntegrationTest.php @@ -0,0 +1,37 @@ +getAbsoluteUrl('/'); + + // Populate the cache. + $this->drupalGet($name); + + $cache = $this->container->get('cache.url_generator'); + // BAD - Use knowledge of an internal implementation detail to extract the + // cache data! + $data = $cache->get($name)->data; + $this->assertFalse(empty($data), 'The cache has been primed.'); + } + +}