From bead8b42da4f17238dc0d5e0f90184b224ec5df7 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 14 Jun 2017 15:02:34 +0200 Subject: Fix reviews Encrypt username too Redirect to list after saving credentials Fix typos Signed-off-by: Thomas Citharel --- tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 2 +- tests/Wallabag/CoreBundle/Controller/SiteCredentialControllerTest.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index 80380685..f17dc97b 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -1340,7 +1340,7 @@ class EntryControllerTest extends WallabagCoreTestCase $user = $client->getContainer()->get('security.token_storage')->getToken()->getUser(); $credential = new SiteCredential($user); $credential->setHost('monde-diplomatique.fr'); - $credential->setUsername('foo'); + $credential->setUsername($client->getContainer()->get('wallabag_core.helper.crypto_proxy')->crypt('foo')); $credential->setPassword($client->getContainer()->get('wallabag_core.helper.crypto_proxy')->crypt('bar')); $em->persist($credential); diff --git a/tests/Wallabag/CoreBundle/Controller/SiteCredentialControllerTest.php b/tests/Wallabag/CoreBundle/Controller/SiteCredentialControllerTest.php index 7e6dafee..e73a9743 100644 --- a/tests/Wallabag/CoreBundle/Controller/SiteCredentialControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/SiteCredentialControllerTest.php @@ -85,7 +85,6 @@ class SiteCredentialControllerTest extends WallabagCoreTestCase $crawler = $client->followRedirect(); $this->assertContains('flashes.site_credential.notice.updated', $crawler->filter('body')->extract(['_text'])[0]); - $this->assertContains('larry', $crawler->filter('input[id=site_credential_username]')->attr('value')); } public function testEditFromADifferentUserSiteCredential() -- cgit v1.2.3