@@ 169-177 (lines=9) @@ | ||
166 | /** |
|
167 | * Make sure we get the correct size |
|
168 | */ |
|
169 | public function testGetAvatarSize() { |
|
170 | $this->avatarMock->expects($this->once()) |
|
171 | ->method('get') |
|
172 | ->with($this->equalTo(32)); |
|
173 | ||
174 | $this->container['AvatarManager']->method('getAvatar')->willReturn($this->avatarMock); |
|
175 | ||
176 | $this->avatarController->getAvatar($this->user, 32); |
|
177 | } |
|
178 | ||
179 | /** |
|
180 | * We cannot get avatars that are 0 or negative |
|
@@ 182-190 (lines=9) @@ | ||
179 | /** |
|
180 | * We cannot get avatars that are 0 or negative |
|
181 | */ |
|
182 | public function testGetAvatarSizeMin() { |
|
183 | $this->avatarMock->expects($this->once()) |
|
184 | ->method('get') |
|
185 | ->with($this->equalTo(64)); |
|
186 | ||
187 | $this->container['AvatarManager']->method('getAvatar')->willReturn($this->avatarMock); |
|
188 | ||
189 | $this->avatarController->getAvatar($this->user, 0); |
|
190 | } |
|
191 | ||
192 | /** |
|
193 | * We do not support avatars larger than 2048*2048 |
|
@@ 195-203 (lines=9) @@ | ||
192 | /** |
|
193 | * We do not support avatars larger than 2048*2048 |
|
194 | */ |
|
195 | public function testGetAvatarSizeMax() { |
|
196 | $this->avatarMock->expects($this->once()) |
|
197 | ->method('get') |
|
198 | ->with($this->equalTo(2048)); |
|
199 | ||
200 | $this->container['AvatarManager']->method('getAvatar')->willReturn($this->avatarMock); |
|
201 | ||
202 | $this->avatarController->getAvatar($this->user, 2049); |
|
203 | } |
|
204 | ||
205 | /** |
|
206 | * Remove an avatar |