Completed
Pull Request — master (#9)
by Hugo
02:31
created

it_should_send_graphql_query_with_variables()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace spec\Yproximite\Api\Client;
4
5
use Http\Client\HttpClient;
6
use Http\Message\MessageFactory;
7
use PhpSpec\ObjectBehavior;
8
use Yproximite\Api\Client\AuthClient;
9
use Yproximite\Api\Client\GraphQLClient;
10
11
class GraphQLClientSpec extends ObjectBehavior
12
{
13
    const GRAPHQL_ENDPOINT = 'https://graphql.yproximite.fr';
14
15
    function it_is_initializable()
16
    {
17
        $this->shouldHaveType(GraphQLClient::class);
18
    }
19
20
    function let(HttpClient $httpClient, AuthClient $authClient, MessageFactory $messageFactory)
21
    {
22
        $this->beConstructedWith($authClient, self::GRAPHQL_ENDPOINT, $httpClient, $messageFactory);
23
    }
24
25
    function it_should_send_auth_request_before_graphql_request()
26
    {
27
    }
28
29
    function it_should_handle_case_where_api_token_is_invalid()
30
    {
31
    }
32
33
    function it_should_handle_case_auth_response_returns_401()
34
    {
35
    }
36
37
    function it_should_handle_case_auth_response_is_invalid_json()
38
    {
39
    }
40
41
    function it_should_send_graphql_query()
42
    {
43
    }
44
45
    function it_should_send_graphql_query_with_variables()
46
    {
47
    }
48
49
    function it_should_handle_case_when_graphql_query_returns_errors()
50
    {
51
    }
52
53
    function it_should_handle_case_when_graphql_query_returns_warnings()
54
    {
55
    }
56
57
    function it_should_send_graphql_mutation()
58
    {
59
    }
60
61
    function it_should_send_graphql_mutation_with_variables()
62
    {
63
    }
64
65
    function it_should_handle_case_when_mutation_query_returns_errors()
66
    {
67
    }
68
69
    function it_should_handle_case_when_mutation_query_returns_warnings()
70
    {
71
    }
72
73
    function it_should_upload_files_and_respect_client_immutability()
74
    {
75
    }
76
77
    function it_should_handle_case_when_uploading_is_failing()
78
    {
79
    }
80
}
81