aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2017-05-03 10:23:49 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-06-20 16:03:20 +0200
commit9de9f1e5ceed4ac7ecd27e1cb808e630a831f94b (patch)
tree6db9842b413ba4cec80b1d36c54cf77bf1a4c2c0 /src/Wallabag
parentfd7fde95159828960784a438c4b4da147e20ab18 (diff)
downloadwallabag-9de9f1e5ceed4ac7ecd27e1cb808e630a831f94b.tar.gz
wallabag-9de9f1e5ceed4ac7ecd27e1cb808e630a831f94b.tar.zst
wallabag-9de9f1e5ceed4ac7ecd27e1cb808e630a831f94b.zip
Add a live test for restricted article
It is not aimed to test if we can get the full article (since we aren't using real login/password) but mostly to test the full work (with authentication, etc.) Do not clean fixtured to avoid SQLite to re-use id for entry tag relation 😓
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Controller/SiteCredentialController.php4
-rw-r--r--src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php5
2 files changed, 3 insertions, 6 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php b/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php
index 429f529a..dc8e723d 100644
--- a/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php
+++ b/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php
@@ -24,9 +24,7 @@ class SiteCredentialController extends Controller
24 */ 24 */
25 public function indexAction() 25 public function indexAction()
26 { 26 {
27 $em = $this->getDoctrine()->getManager(); 27 $credentials = $this->get('wallabag_core.site_credential_repository')->findByUser($this->getUser());
28
29 $credentials = $em->getRepository('WallabagCoreBundle:SiteCredential')->findByUser($this->getUser());
30 28
31 return $this->render('WallabagCoreBundle:SiteCredential:index.html.twig', array( 29 return $this->render('WallabagCoreBundle:SiteCredential:index.html.twig', array(
32 'credentials' => $credentials, 30 'credentials' => $credentials,
diff --git a/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php b/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php
index ae69492d..62a3bc13 100644
--- a/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php
+++ b/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php
@@ -31,14 +31,13 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder
31 */ 31 */
32 private $currentUser; 32 private $currentUser;
33 33
34
35 /** 34 /**
36 * GrabySiteConfigBuilder constructor. 35 * GrabySiteConfigBuilder constructor.
37 * 36 *
38 * @param ConfigBuilder $grabyConfigBuilder 37 * @param ConfigBuilder $grabyConfigBuilder
39 * @param TokenStorage $token 38 * @param TokenStorage $token
40 * @param SiteCredentialRepository $credentialRepository 39 * @param SiteCredentialRepository $credentialRepository
41 * @param LoggerInterface $logger 40 * @param LoggerInterface $logger
42 */ 41 */
43 public function __construct(ConfigBuilder $grabyConfigBuilder, TokenStorage $token, SiteCredentialRepository $credentialRepository, LoggerInterface $logger) 42 public function __construct(ConfigBuilder $grabyConfigBuilder, TokenStorage $token, SiteCredentialRepository $credentialRepository, LoggerInterface $logger)
44 { 43 {