public function setUp()
 {
     $this->client = static::createClient();
     $this->container = $this->client->getContainer();
     $this->user = FakeLogin::getUser($this->container);
     FakeLogin::logIn($this->client, $this->container, $this->user);
 }
 /**
  * Test successful registration
  */
 public function testRegistration()
 {
     $crawler = $this->client->request('GET', '/register/');
     $form = $crawler->selectButton('Register')->form();
     $values = $form->getValues();
     $values["fos_user_registration_form[email]"] = '*****@*****.**';
     $values["fos_user_registration_form[plainPassword][first]"] = 'user';
     $values["fos_user_registration_form[plainPassword][second]"] = 'user';
     $values["fos_user_registration_form[firstName]"] = 'First';
     $values["fos_user_registration_form[lastName]"] = 'Last';
     $form->setValues($values);
     $this->client->submit($form);
     $this->assertTrue($this->client->getResponse()->isRedirect());
     $user = FakeLogin::getUser($this->container);
     FakeLogin::removeUser($user, $this->container);
 }