| @@ 267-281 (lines=15) @@ | ||
| 264 | ); |
|
| 265 | } |
|
| 266 | ||
| 267 | public function testUpdateUser() |
|
| 268 | { |
|
| 269 | $handler = $this->getUserHandler(); |
|
| 270 | ||
| 271 | $handler->create($user = $this->getValidUser()); |
|
| 272 | ||
| 273 | $user->login = 'New_lögin'; |
|
| 274 | $handler->update($user); |
|
| 275 | ||
| 276 | $this->assertQueryResult( |
|
| 277 | array(array(42, '[email protected]', 'New_lögin', 1234567890, '2')), |
|
| 278 | $this->handler->createSelectQuery()->select('*')->from('ezuser'), |
|
| 279 | 'Expected user data to be updated.' |
|
| 280 | ); |
|
| 281 | } |
|
| 282 | ||
| 283 | public function testUpdateUserSettings() |
|
| 284 | { |
|
| @@ 283-297 (lines=15) @@ | ||
| 280 | ); |
|
| 281 | } |
|
| 282 | ||
| 283 | public function testUpdateUserSettings() |
|
| 284 | { |
|
| 285 | $handler = $this->getUserHandler(); |
|
| 286 | ||
| 287 | $handler->create($user = $this->getValidUser()); |
|
| 288 | ||
| 289 | $user->maxLogin = 42; |
|
| 290 | $handler->update($user); |
|
| 291 | ||
| 292 | $this->assertQueryResult( |
|
| 293 | array(array(1, 42, 42)), |
|
| 294 | $this->handler->createSelectQuery()->select('*')->from('ezuser_setting'), |
|
| 295 | 'Expected user data to be updated.' |
|
| 296 | ); |
|
| 297 | } |
|
| 298 | ||
| 299 | public function testSilentlyUpdateNotExistingUser() |
|
| 300 | { |
|