1 | <?php |
||
10 | class ClientSpec extends ObjectBehavior |
||
11 | { |
||
12 | const GRAPHQL_ENDPOINT = 'https://graphql.yproximite.fr'; |
||
13 | |||
14 | function it_is_initializable() |
||
18 | |||
19 | function let(HttpClient $httpClient, MessageFactory $messageFactory) |
||
23 | |||
24 | function it_should_send_auth_request_before_graphql_request() |
||
27 | |||
28 | function it_should_handle_case_where_api_token_is_invalid() |
||
31 | |||
32 | function it_should_handle_case_auth_response_returns_401() |
||
35 | |||
36 | function it_should_handle_case_auth_response_is_invalid_json() |
||
39 | |||
40 | function it_should_send_graphql_query() |
||
43 | |||
44 | function it_should_send_graphql_query_with_variables() |
||
47 | |||
48 | function it_should_handle_case_when_graphql_query_returns_errors() |
||
51 | |||
52 | function it_should_handle_case_when_graphql_query_returns_warnings() |
||
55 | |||
56 | function it_should_send_graphql_mutation() |
||
59 | |||
60 | function it_should_send_graphql_mutation_with_variables() |
||
63 | |||
64 | function it_should_handle_case_when_mutation_query_returns_errors() |
||
67 | |||
68 | function it_should_handle_case_when_mutation_query_returns_warnings() |
||
71 | |||
72 | function it_should_upload_files_and_respect_client_immutability() |
||
75 | |||
76 | function it_should_handle_case_when_uploading_is_failing() |
||
79 | } |
||
80 |