You are here

public function RoutingTest::testUrlPath in GraphQL 8.4

@covers \Drupal\graphql\Plugin\GraphQL\DataProducer\Routing\Url\UrlPath::resolve

File

tests/src/Kernel/DataProducer/RoutingTest.php, line 29

Class

RoutingTest
Data producers Routing test class.

Namespace

Drupal\Tests\graphql\Kernel\DataProducer

Code

public function testUrlPath() : void {
  $this->pathValidator = $this->container
    ->get('path.validator');
  $url = $this->pathValidator
    ->getUrlIfValidWithoutAccessCheck('/user/logout');
  $result = $this
    ->executeDataProducer('url_path', [
    'url' => $url,
  ]);
  $this
    ->assertEquals('/user/logout', $result);
}