@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
98 | - * @return \PHPUnit_Framework_MockObject_MockObject|\Symfony\Component\HttpKernel\HttpKernelInterface |
|
98 | + * @return HttpKernelInterface |
|
99 | 99 | */ |
100 | 100 | private function createHttpKernelMock() |
101 | 101 | { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
106 | - * @return \PHPUnit_Framework_MockObject_MockObject|\Symfony\Component\HttpFoundation\Request |
|
106 | + * @return \Symfony\Component\HttpFoundation\Request |
|
107 | 107 | */ |
108 | 108 | private function createRequestMock() |
109 | 109 | { |
@@ -68,6 +68,9 @@ discard block |
||
68 | 68 | return $this->getMock('\JMS\Serializer\SerializerInterface'); |
69 | 69 | } |
70 | 70 | |
71 | + /** |
|
72 | + * @param string $data |
|
73 | + */ |
|
71 | 74 | protected function validateDeserializer($data, $type, $returnValue) |
72 | 75 | { |
73 | 76 | $this->serializer |
@@ -124,6 +127,9 @@ discard block |
||
124 | 127 | return $response; |
125 | 128 | } |
126 | 129 | |
130 | + /** |
|
131 | + * @param string $body |
|
132 | + */ |
|
127 | 133 | protected function validateRequest($method, $uri, array $urlParameters, $body = null, $response = null) |
128 | 134 | { |
129 | 135 | $request = $this->createRequestMock($response); |
@@ -137,6 +143,12 @@ discard block |
||
137 | 143 | return $request; |
138 | 144 | } |
139 | 145 | |
146 | + /** |
|
147 | + * @param string $method |
|
148 | + * @param string $uri |
|
149 | + * @param integer $statusCode |
|
150 | + * @param string $type |
|
151 | + */ |
|
140 | 152 | protected function validateRetrieveApiCall($method, $uri, array $urlParameters, $statusCode, $type, $transformedResult, array $serializerMap = array()) |
141 | 153 | { |
142 | 154 | $rawResponse = 'the-server-response'; |
@@ -166,6 +178,11 @@ discard block |
||
166 | 178 | } |
167 | 179 | } |
168 | 180 | |
181 | + /** |
|
182 | + * @param string $method |
|
183 | + * @param string $uri |
|
184 | + * @param string $rawResponse |
|
185 | + */ |
|
169 | 186 | protected function validateStoreApiCall($method, $uri, array $urlParameters, $statusCode, $rawResponse, $object, array $serializerMap = array()) |
170 | 187 | { |
171 | 188 | $rawRequest = 'the-request-body'; |
@@ -181,6 +198,9 @@ discard block |
||
181 | 198 | $this->validateSerializer($serializerMap); |
182 | 199 | } |
183 | 200 | |
201 | + /** |
|
202 | + * @param string $uri |
|
203 | + */ |
|
184 | 204 | protected function validateDeleteDocumentCall($uri, array $urlParameters, array $serializerMap = array()) |
185 | 205 | { |
186 | 206 | $response = $this->createResponseMock(204, ''); |
@@ -68,6 +68,9 @@ |
||
68 | 68 | return static::createGroup('Anonymous Group'); |
69 | 69 | } |
70 | 70 | |
71 | + /** |
|
72 | + * @param string $name |
|
73 | + */ |
|
71 | 74 | private static function createGroup($name, Account $account = null) |
72 | 75 | { |
73 | 76 | $memberAccount = new Account('Member of a group', 'http://example.com/account'); |