protected function tearDown()
 {
     parent::tearDown();
     $configManager = $this->getContainer()->get('oro_config.manager');
     $configManager->set('oro_b2b_account.confirmation_required', $this->isConfirmationRequired);
     $configManager->set('oro_b2b_account.send_password_in_welcome_email', $this->sendPassword);
     $configManager->flush();
 }
 protected function tearDown()
 {
     // clear DB from separate connection, close to avoid connection limit and memory leak
     $manager = $this->getContainer()->get('akeneo_batch.job_repository')->getJobManager();
     $manager->rollback();
     $manager->getConnection()->close();
     parent::tearDown();
 }
Example #3
0
 public function testGroupAdd()
 {
     $randomPrefix = WebTestCase::generateRandomString(5);
     $login = $this->login();
     /** @var Groups $login */
     $groups = $login->openGroups('Oro\\Bundle\\UserBundle')->add()->setName($this->newGroup['NAME'] . $randomPrefix)->setOwner('Main')->save()->assertMessage('Group saved')->close();
     static::assertTrue($groups->entityExists(array('name' => $this->newGroup['NAME'] . $randomPrefix)));
     return $randomPrefix;
 }
Example #4
0
 protected function tearDown()
 {
     // clear DB from separate connection
     $batchJobManager = $this->getBatchJobManager();
     $batchJobManager->createQuery('DELETE AkeneoBatchBundle:JobInstance')->execute();
     $batchJobManager->createQuery('DELETE AkeneoBatchBundle:JobExecution')->execute();
     $batchJobManager->createQuery('DELETE AkeneoBatchBundle:StepExecution')->execute();
     parent::tearDown();
 }
 public function tearDown()
 {
     $em = $this->getContainer()->get('doctrine')->getManager();
     $entities = $em->getRepository('JMS\\JobQueueBundle\\Entity\\Job')->findAll();
     foreach ($entities as $entity) {
         $em->remove($entity);
     }
     $em->flush($entities);
     parent::tearDown();
 }
Example #6
0
 /**
  * {@inheritdoc}
  */
 public function request($method, $uri, array $parameters = array(), array $files = array(), array $server = array(), $content = null, $changeHistory = true)
 {
     if (strpos($uri, 'http://') === false) {
         $uri = self::LOCAL_URL . $uri;
     }
     if ($this->getServerParameter('HTTP_X-WSSE', '') !== '' && !isset($server['HTTP_X-WSSE'])) {
         //generate new WSSE header
         parent::setServerParameters(WebTestCase::generateWsseAuthHeader());
     }
     return parent::request($method, $uri, $parameters, $files, $server, $content, $changeHistory);
 }
Example #7
0
 public function testRolesAddSaveAndClose()
 {
     $randomPrefix = WebTestCase::generateRandomString(5);
     $login = $this->login();
     /** @var Roles $login */
     $roles = $login->openRoles('Oro\\Bundle\\UserBundle')->assertTitle('All - Roles - User Management - System')->add()->assertTitle('Create Role - Roles - User Management - System')->setLabel($this->newRole['LABEL'] . $randomPrefix)->save()->assertMessage('Role saved')->close();
     //verify new Role
     $roles->refresh();
     static::assertTrue($roles->entityExists(array('name' => $this->newRole['LABEL'] . $randomPrefix)));
     return $randomPrefix;
 }
 /**
  * Creates a Client.
  *
  * @param array $options An array of options to pass to the createKernel class
  * @param array $server  An array of server parameters
  *
  * @return Client A Client instance
  */
 protected static function createClient(array $options = array(), array $server = array())
 {
     /** @var Client $client */
     $client = parent::createClient($options, $server);
     $kernel = $client->getKernel();
     $application = new \Symfony\Bundle\FrameworkBundle\Console\Application($kernel);
     $application->setAutoExit(false);
     self::$internalApplication = $application;
     $command = new BehatCommand();
     $command->setApplication($application);
     self::$internalCommand = $command;
     return $client;
 }
 protected function tearDown()
 {
     $this->fs->remove($this->directory);
     parent::tearDown();
 }
Example #10
0
 public static function tearDownAfterClass()
 {
     parent::tearDownAfterClass();
     self::$contactIds = null;
 }
Example #11
0
 protected function tearDown()
 {
     $this->dropBatchJobs();
     $this->closeConnections();
     parent::tearDown();
 }
 protected function tearDown()
 {
     parent::tearDown();
     $this->dropJobsRecords();
 }
Example #13
0
 protected function tearDown()
 {
     $this->client->rollbackTransaction();
     parent::tearDown();
 }
Example #14
0
 /**
  * @Given /^I press "([^"]*)"$/
  */
 public function iPress($button)
 {
     $client = self::getClientInstance();
     $client->followRedirects();
     $client->submit($this->form);
     WebTestCase::assertHtmlResponseStatusCodeEquals($client->getResponse(), 200);
 }