1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-01 17:38:38 +00:00

Use FQCN instead of service alias

This commit is contained in:
Yassine Guedidi 2022-08-28 02:01:46 +02:00
parent 156158673f
commit eb43c78720
62 changed files with 579 additions and 404 deletions

View file

@ -2,6 +2,8 @@
namespace Tests\Wallabag\CoreBundle\Controller;
use Craue\ConfigBundle\Util\Config;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Client;
use Tests\Wallabag\CoreBundle\WallabagCoreTestCase;
use Wallabag\CoreBundle\Entity\SiteCredential;
@ -13,13 +15,13 @@ class SiteCredentialControllerTest extends WallabagCoreTestCase
$this->logInAs('admin');
$client = $this->getClient();
$client->getContainer()->get('craue_config')->set('restricted_access', 0);
$client->getContainer()->get(Config::class)->set('restricted_access', 0);
$client->request('GET', '/site-credentials/');
$this->assertSame(404, $client->getResponse()->getStatusCode());
$client->getContainer()->get('craue_config')->set('restricted_access', 1);
$client->getContainer()->get(Config::class)->set('restricted_access', 1);
}
public function testListSiteCredential()
@ -144,7 +146,7 @@ class SiteCredentialControllerTest extends WallabagCoreTestCase
$credential->setUsername('sergei');
$credential->setPassword('microsoft');
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$em = $client->getContainer()->get(EntityManagerInterface::class);
$em->persist($credential);
$em->flush();