for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Starkerxp\StructureBundle\Tests;
use Liip\FunctionalTestBundle\Test\WebTestCase;
use Starkerxp\UtilisateurBundle\Entity\Utilisateur;
abstract class WebTest extends WebTestCase
{
protected $identifiant = "[email protected]";
protected $motDePasse = "motMotDePasse";
/**
* Erase all database data.
*/
public function setUp()
$this->loadFixtureFiles([]);
}
* Retourne l'entity manager de la connexion defaut.
*
* @return \Doctrine\Common\Persistence\ObjectManager|object
protected function getEntityManager()
return $this->getContainer()->get('doctrine')->getManager();
protected function getAuthClient()
$client = static::createClient();
$client->request(
'POST',
'/api/login_check',
[
'identifiant' => $this->identifiant,
'motDePasse' => $this->motDePasse,
]
);
$dataHeader = json_decode($client->getResponse()->getContent(), true);
$client->setServerParameter('HTTP_Authorization', sprintf('Bearer %s', $dataHeader['token']));
return $client;
This check marks files that end in a newline character, i.e. an empy line.
This check marks files that end in a newline character, i.e. an empy line.