/** * Helper function to test a query and the expected response. */ private function assertValidQuery($query, $expected) { $this->assertEquals(['data' => $expected], GraphQL::execute(StarWarsSchema::build(), $query)); }