Example #1
0
 public function setUp()
 {
     parent::setUp();
     $this->client = static::createClient();
     $this->client->restart();
     if ($this->logger === null) {
         $this->logger = $this->client->getContainer()->get('monolog.logger.devel');
     }
 }
 public function testPostCredentialsSSL()
 {
     $this->createConfig();
     $testing = $this->container->getParameter('testing');
     $dbParams = $testing['db']['mysql_ssl'];
     self::$client->restart();
     self::$client->request('POST', $this->componentName . '/configs/test/credentials', array(), array(), array(), json_encode($dbParams));
     $responseJson = self::$client->getResponse()->getContent();
     $response = json_decode($responseJson, true);
     $this->assertArrayHasKey('ssl', $response);
     $ssl = $response['ssl'];
     $this->assertEquals('ssl-ca-test-string', $ssl['ca']);
     $this->assertEquals('ssl-key-test-string', $ssl['key']);
     $this->assertEquals('ssl-cert-test-string', $ssl['cert']);
 }
 public function setUp()
 {
     $this->client = static::createClient();
     $this->client->restart();
 }
Example #4
0
 /**
  * Reset client with the fresh new client
  */
 public function refreshClient()
 {
     $this->client->restart();
     $this->is_open = false;
 }
 /**
  * Restarts the client.
  *
  * It flushes history and all cookies.
  *
  * @api
  */
 public function restart()
 {
     $this->subject->restart();
 }
Example #6
0
 /**
  * Logout of the application
  *
  * @param Client $client
  *
  * @return Client
  */
 public function logout(Client $client)
 {
     $client->request('GET', '/logout');
     $client->restart();
     return $client;
 }