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