1 | <?php |
||
11 | class GraphQLClientSpec extends ObjectBehavior |
||
12 | { |
||
13 | const GRAPHQL_ENDPOINT = 'https://graphql.yproximite.fr'; |
||
14 | |||
15 | function it_is_initializable() |
||
19 | |||
20 | function let(HttpClient $httpClient, AuthClient $authClient, MessageFactory $messageFactory) |
||
24 | |||
25 | function it_should_send_auth_request_before_graphql_request() |
||
28 | |||
29 | function it_should_handle_case_where_api_token_is_invalid() |
||
32 | |||
33 | function it_should_handle_case_auth_response_returns_401() |
||
36 | |||
37 | function it_should_handle_case_auth_response_is_invalid_json() |
||
40 | |||
41 | function it_should_send_graphql_query() |
||
44 | |||
45 | function it_should_send_graphql_query_with_variables() |
||
48 | |||
49 | function it_should_handle_case_when_graphql_query_returns_errors() |
||
52 | |||
53 | function it_should_handle_case_when_graphql_query_returns_warnings() |
||
56 | |||
57 | function it_should_send_graphql_mutation() |
||
60 | |||
61 | function it_should_send_graphql_mutation_with_variables() |
||
64 | |||
65 | function it_should_handle_case_when_mutation_query_returns_errors() |
||
68 | |||
69 | function it_should_handle_case_when_mutation_query_returns_warnings() |
||
72 | |||
73 | function it_should_upload_files_and_respect_client_immutability() |
||
76 | |||
77 | function it_should_handle_case_when_uploading_is_failing() |
||
80 | } |
||
81 |