for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Drupal\Tests\graphql_core\Kernel\Routing;
use Drupal\Tests\graphql_core\Kernel\GraphQLContentTestBase;
/**
* Test file attachments.
*
* @group graphql_image
*/
class RouteEntityTest extends GraphQLContentTestBase {
public function testRouteEntity() {
$node = $this->createNode([
'title' => 'Node A',
'type' => 'test',
]);
$node->save();
$query = $this->getQueryFromFile('route_entity.gql');
$vars = ['path' => '/node/' . $node->id()];
// TODO: Check cache metadata.
$metadata = $this->defaultCacheMetaData();
$metadata->addCacheTags([
'node:1',
$this->assertResults($query, $vars, [
'route' => [
'node' => [
],
], $metadata);
$node->setTitle('Node B');
'title' => 'Node B',
}