1 | <?php |
||
15 | class ConnectorTest extends \PHPUnit_Framework_TestCase |
||
16 | { |
||
17 | /** |
||
18 | * @test |
||
19 | */ |
||
20 | public function constructor() |
||
24 | |||
25 | /** |
||
26 | * @test |
||
27 | */ |
||
28 | public function constructorWithClient() |
||
33 | |||
34 | /** |
||
35 | * @test |
||
36 | * @expectedException Exception |
||
37 | */ |
||
38 | public function getBinary() |
||
43 | |||
44 | /** |
||
45 | * @test |
||
46 | * @throws Exception |
||
47 | */ |
||
48 | public function getByRefNeedsCorrectKeysInRef() |
||
54 | |||
55 | /** |
||
56 | * @return array |
||
57 | */ |
||
58 | public function isIdProvider() |
||
70 | |||
71 | /** |
||
72 | * @dataProvider isIdProvider |
||
73 | * @test |
||
74 | * @param $id |
||
75 | * @param $isValid |
||
76 | */ |
||
77 | public function isIdValid($id, $isValid) |
||
81 | |||
82 | /** |
||
83 | * @test |
||
84 | * @throws Exception |
||
85 | */ |
||
86 | public function getByIdsWithEmptyArrayReturnsArray() { |
||
91 | |||
92 | |||
93 | /** |
||
94 | * @test |
||
95 | * @depends isIdValid |
||
96 | */ |
||
97 | public function generateId() |
||
103 | |||
104 | /** |
||
105 | * Create a new HttpClient (as a mock) |
||
106 | * The responses can be injected thus easily reusable |
||
107 | * |
||
108 | * @see http://docs.guzzlephp.org/en/latest/testing.html |
||
109 | * |
||
110 | * @param array $responses |
||
111 | * |
||
112 | * @return Client |
||
113 | */ |
||
114 | private function getHttpClient(array $responses = []) |
||
122 | } |
||
123 |