public function BreadcrumbsTest::testBreadcrumbs in GraphQL 8.3
Test that the breadcrumb query returns breadcrumbs for given path.
File
- modules/
graphql_core/ tests/ src/ Kernel/ Breadcrumbs/ BreadcrumbsTest.php, line 50
Class
- BreadcrumbsTest
- Test entity query support in GraphQL.
Namespace
Drupal\Tests\graphql_core\Kernel\BreadcrumbsCode
public function testBreadcrumbs() {
$query = $this
->getQueryFromFile('breadcrumbs.gql');
$metadata = $this
->defaultCacheMetaData();
$this
->assertResults($query, [
'path' => '/breadcrumbs-test',
], [
'route' => [
'breadcrumb' => [
0 => [
'text' => 'Test breadcrumb',
],
],
],
], $metadata);
}