1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-07-12 16:58:37 +00:00

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 😓
This commit is contained in:
Jeremy Benoist 2017-05-03 10:23:49 +02:00
parent fd7fde9515
commit 9de9f1e5ce
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
5 changed files with 81 additions and 31 deletions

View file

@ -24,9 +24,7 @@ class SiteCredentialController extends Controller
*/
public function indexAction()
{
$em = $this->getDoctrine()->getManager();
$credentials = $em->getRepository('WallabagCoreBundle:SiteCredential')->findByUser($this->getUser());
$credentials = $this->get('wallabag_core.site_credential_repository')->findByUser($this->getUser());
return $this->render('WallabagCoreBundle:SiteCredential:index.html.twig', array(
'credentials' => $credentials,

View file

@ -31,14 +31,13 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder
*/
private $currentUser;
/**
* GrabySiteConfigBuilder constructor.
*
* @param ConfigBuilder $grabyConfigBuilder
* @param TokenStorage $token
* @param TokenStorage $token
* @param SiteCredentialRepository $credentialRepository
* @param LoggerInterface $logger
* @param LoggerInterface $logger
*/
public function __construct(ConfigBuilder $grabyConfigBuilder, TokenStorage $token, SiteCredentialRepository $credentialRepository, LoggerInterface $logger)
{