tests/ChillPersonBundle: use mutualized getClientAuthenticated()

This commit is contained in:
2021-04-23 11:13:35 +02:00
parent 3445335b2d
commit 53813f8f29
2 changed files with 16 additions and 22 deletions

View File

@@ -24,6 +24,7 @@ namespace Chill\PersonBundle\Tests\Controller;
use Chill\PersonBundle\Entity\Person;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Chill\MainBundle\Test\PrepareClientTrait;
/**
* Test the edition of persons
@@ -34,6 +35,8 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
*/
class PersonControllerUpdateTest extends WebTestCase
{
use PrepareClientTrait;
/** @var \Doctrine\ORM\EntityManagerInterface The entity manager */
private $em;
@@ -71,10 +74,7 @@ class PersonControllerUpdateTest extends WebTestCase
$this->editUrl = '/en/person/'.$this->person->getId().'/general/edit';
$this->viewUrl = '/en/person/'.$this->person->getId().'/general';
$this->client = static::createClient(array(), array(
'PHP_AUTH_USER' => 'center a_social',
'PHP_AUTH_PW' => 'password',
));
$this->client = $this->getClientAuthenticated();
}
/**