Conditions | 1 |
Paths | 1 |
Total Lines | 29 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function testNodeContext() { |
||
21 | $node = Node::create([ |
||
22 | 'title' => 'Test', |
||
23 | 'type' => 'test', |
||
24 | ]); |
||
25 | |||
26 | $nodeId = $node->save(); |
||
27 | $draft = $this->getNewDraft($node); |
||
28 | $draft->save(); |
||
29 | |||
30 | |||
31 | $query = <<<GQL |
||
32 | query (\$path: String!) { |
||
33 | route(path: \$path) { |
||
34 | ... on EntityCanonicalUrl { |
||
35 | entity { |
||
36 | ... on EntityRevisionable { |
||
37 | entityRevisions { |
||
38 | count |
||
39 | } |
||
40 | } |
||
41 | } |
||
42 | } |
||
43 | } |
||
44 | } |
||
45 | GQL; |
||
46 | |||
47 | $this->query($query, ['path' => '/node/' . $nodeId]); |
||
48 | } |
||
49 | |||
51 |