graphQlQuery($query); $this->assertArrayHasKey('products', $response); $this->assertArrayHasKey('items', $response['products']); $this->assertArrayHasKey(0, $response['products']['items']); $product = $response['products']['items'][0]; $this->assertArrayHasKey('configurable_options', $product); $this->assertArrayHasKey(0, $product['configurable_options']); $this->assertArrayHasKey('label', $product['configurable_options'][0]); $option = $product['configurable_options'][0]; $this->assertEquals($expectLabelValue, $option['label']); } }