diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php index 51425fe1..bf455f32 100644 --- a/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php +++ b/src/Wallabag/CoreBundle/Tests/Controller/ConfigControllerTest.php | |||
@@ -102,7 +102,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
102 | 'change_passwd[new_password][first]' => '', | 102 | 'change_passwd[new_password][first]' => '', |
103 | 'change_passwd[new_password][second]' => '', | 103 | 'change_passwd[new_password][second]' => '', |
104 | ), | 104 | ), |
105 | 'Wrong value for your current password', | 105 | 'validator.password_wrong_value', |
106 | ), | 106 | ), |
107 | array( | 107 | array( |
108 | array( | 108 | array( |
@@ -118,7 +118,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
118 | 'change_passwd[new_password][first]' => 'hop', | 118 | 'change_passwd[new_password][first]' => 'hop', |
119 | 'change_passwd[new_password][second]' => '', | 119 | 'change_passwd[new_password][second]' => '', |
120 | ), | 120 | ), |
121 | 'The password fields must match', | 121 | 'validator.password_must_match', |
122 | ), | 122 | ), |
123 | array( | 123 | array( |
124 | array( | 124 | array( |
@@ -126,7 +126,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
126 | 'change_passwd[new_password][first]' => 'hop', | 126 | 'change_passwd[new_password][first]' => 'hop', |
127 | 'change_passwd[new_password][second]' => 'hop', | 127 | 'change_passwd[new_password][second]' => 'hop', |
128 | ), | 128 | ), |
129 | 'Password should by at least', | 129 | 'validator.password_too_short', |
130 | ), | 130 | ), |
131 | ); | 131 | ); |
132 | } | 132 | } |
@@ -188,14 +188,14 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
188 | 'update_user[name]' => '', | 188 | 'update_user[name]' => '', |
189 | 'update_user[email]' => '', | 189 | 'update_user[email]' => '', |
190 | ), | 190 | ), |
191 | 'Please enter an email', | 191 | 'fos_user.email.blank', |
192 | ), | 192 | ), |
193 | array( | 193 | array( |
194 | array( | 194 | array( |
195 | 'update_user[name]' => '', | 195 | 'update_user[name]' => '', |
196 | 'update_user[email]' => 'test', | 196 | 'update_user[email]' => 'test', |
197 | ), | 197 | ), |
198 | 'The email is not valid', | 198 | 'fos_user.email.invalid', |
199 | ), | 199 | ), |
200 | ); | 200 | ); |
201 | } | 201 | } |
@@ -244,7 +244,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
244 | 244 | ||
245 | $crawler = $client->followRedirect(); | 245 | $crawler = $client->followRedirect(); |
246 | 246 | ||
247 | $this->assertGreaterThan(1, $alert = $crawler->filter('div.messages.success')->extract(array('_text'))); | 247 | $this->assertGreaterThan(1, $alert = $crawler->filter('body')->extract(array('_text'))); |
248 | $this->assertContains('Information updated', $alert[0]); | 248 | $this->assertContains('Information updated', $alert[0]); |
249 | } | 249 | } |
250 | 250 | ||
@@ -258,7 +258,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
258 | 'new_user[plainPassword][second]' => '', | 258 | 'new_user[plainPassword][second]' => '', |
259 | 'new_user[email]' => '', | 259 | 'new_user[email]' => '', |
260 | ), | 260 | ), |
261 | 'Please enter a username', | 261 | 'fos_user.username.blank', |
262 | ), | 262 | ), |
263 | array( | 263 | array( |
264 | array( | 264 | array( |
@@ -267,7 +267,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
267 | 'new_user[plainPassword][second]' => 'mypassword', | 267 | 'new_user[plainPassword][second]' => 'mypassword', |
268 | 'new_user[email]' => '', | 268 | 'new_user[email]' => '', |
269 | ), | 269 | ), |
270 | 'The username is too short', | 270 | 'fos_user.username.short', |
271 | ), | 271 | ), |
272 | array( | 272 | array( |
273 | array( | 273 | array( |
@@ -276,7 +276,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
276 | 'new_user[plainPassword][second]' => 'mypassword', | 276 | 'new_user[plainPassword][second]' => 'mypassword', |
277 | 'new_user[email]' => 'test', | 277 | 'new_user[email]' => 'test', |
278 | ), | 278 | ), |
279 | 'The email is not valid', | 279 | 'fos_user.email.invalid', |
280 | ), | 280 | ), |
281 | array( | 281 | array( |
282 | array( | 282 | array( |
@@ -285,7 +285,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
285 | 'new_user[plainPassword][second]' => 'wallacewallace', | 285 | 'new_user[plainPassword][second]' => 'wallacewallace', |
286 | 'new_user[email]' => 'wallace@wallace.me', | 286 | 'new_user[email]' => 'wallace@wallace.me', |
287 | ), | 287 | ), |
288 | 'The username is already used', | 288 | 'fos_user.username.already_used', |
289 | ), | 289 | ), |
290 | array( | 290 | array( |
291 | array( | 291 | array( |
@@ -294,7 +294,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
294 | 'new_user[plainPassword][second]' => 'mypassword2', | 294 | 'new_user[plainPassword][second]' => 'mypassword2', |
295 | 'new_user[email]' => 'wallace@wallace.me', | 295 | 'new_user[email]' => 'wallace@wallace.me', |
296 | ), | 296 | ), |
297 | 'The password fields must match', | 297 | 'validator.password_must_match', |
298 | ), | 298 | ), |
299 | ); | 299 | ); |
300 | } | 300 | } |
@@ -382,7 +382,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
382 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); | 382 | $this->assertEquals(200, $client->getResponse()->getStatusCode()); |
383 | 383 | ||
384 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); | 384 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); |
385 | $this->assertContains('You need to generate a token first.', $body[0]); | 385 | $this->assertContains('config.form_rss.no_token', $body[0]); |
386 | 386 | ||
387 | $client->request('GET', '/generate-token'); | 387 | $client->request('GET', '/generate-token'); |
388 | $this->assertEquals(302, $client->getResponse()->getStatusCode()); | 388 | $this->assertEquals(302, $client->getResponse()->getStatusCode()); |
@@ -390,7 +390,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
390 | $crawler = $client->followRedirect(); | 390 | $crawler = $client->followRedirect(); |
391 | 391 | ||
392 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); | 392 | $this->assertGreaterThan(1, $body = $crawler->filter('body')->extract(array('_text'))); |
393 | $this->assertNotContains('You need to generate a token first.', $body[0]); | 393 | $this->assertNotContains('config.form_rss.no_token', $body[0]); |
394 | } | 394 | } |
395 | 395 | ||
396 | public function testGenerateTokenAjax() | 396 | public function testGenerateTokenAjax() |
@@ -454,7 +454,7 @@ class ConfigControllerTest extends WallabagCoreTestCase | |||
454 | array( | 454 | array( |
455 | 'rss_config[rss_limit]' => 1000000000000, | 455 | 'rss_config[rss_limit]' => 1000000000000, |
456 | ), | 456 | ), |
457 | 'This will certainly kill the app', | 457 | 'validator.rss_limit_too_hight', |
458 | ), | 458 | ), |
459 | ); | 459 | ); |
460 | } | 460 | } |