1 | <?php |
||
13 | class ContextualViewsTest extends ViewsTestBase { |
||
14 | |||
15 | /** |
||
16 | * The GraphQL schema. |
||
17 | * |
||
18 | * @var \Youshido\GraphQL\Schema\AbstractSchema |
||
19 | */ |
||
20 | protected $schema; |
||
21 | |||
22 | /** |
||
23 | * The types collected from the GraphQL schema. |
||
24 | * |
||
25 | * @var \Youshido\GraphQL\Type\TypeInterface[] |
||
26 | */ |
||
27 | protected $types; |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | protected function setUp() { |
||
38 | |||
39 | /** |
||
40 | * Test if view contextual filters are set properly. |
||
41 | */ |
||
42 | public function testContextualViewArgs() { |
||
77 | |||
78 | /** |
||
79 | * Test if view fields are attached to correct types. |
||
80 | */ |
||
81 | public function testContextualViewFields() { |
||
102 | |||
103 | /** |
||
104 | * Assert that field exists on a GraphQL type. |
||
105 | * |
||
106 | * @param string $type |
||
107 | * GraphQL type name. |
||
108 | * @param string $fieldName |
||
109 | * GraphQL field name. |
||
110 | */ |
||
111 | protected function assertFieldExists($type, $fieldName) { |
||
114 | |||
115 | /** |
||
116 | * Assert that field does not exist on a GraphQL type. |
||
117 | * |
||
118 | * @param string $type |
||
119 | * GraphQL type name. |
||
120 | * @param string $fieldName |
||
121 | * GraphQL field name. |
||
122 | */ |
||
123 | protected function assertFieldNotExists($type, $fieldName) { |
||
126 | |||
127 | /** |
||
128 | * Returns list of GraphQL fields attached to a type. |
||
129 | * |
||
130 | * @param string $type |
||
131 | * GraphQL type name. |
||
132 | * |
||
133 | * @return \Youshido\GraphQL\Field\Field[] |
||
134 | */ |
||
135 | protected function getFields($type) { |
||
140 | |||
141 | } |
||
142 |