public function setUp()
 {
     static::$kernel = static::createKernel();
     static::$kernel->boot();
     $this->dm = static::$kernel->getContainer()->get('doctrine.odm.mongodb.document_manager');
     parent::setUp();
 }
 /**
  * {@inheritDoc}
  * @see PHPUnit_Framework_TestCase::setUp()
  */
 public function setUp()
 {
     parent::setUp();
     static::$kernel = static::createKernel();
     static::$kernel->boot();
     $this->entityManager = self::$kernel->getContainer()->get('asf_user.user.manager');
 }
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     parent::setUp();
     self::bootKernel();
     $this->em = static::$kernel->getContainer()->get('doctrine')->getManager();
     $this->registryRepository = $this->em->getRepository('JdrAppBundle:Registry');
 }
 protected function setUp()
 {
     parent::setUp();
     $this->bootKernel();
     $this->scheduler = self::$kernel->getContainer()->get('task.scheduler');
     $this->storage = self::$kernel->getContainer()->get('task.storage');
 }
 protected function setUp()
 {
     parent::setUp();
     $this->deleteTmpDir();
     static::bootKernel();
     $this->testCase = static::$kernel->getTestCase();
     if (is_null($this->util)) {
         $this->util = $this->createUtil();
     }
 }
Beispiel #6
0
 public function setUp()
 {
     static::$kernel = static::createKernel();
     static::$kernel->boot();
     $this->client = static::createClient([], ['HTTP_HOST' => static::$httpHost]);
     $this->em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager');
     $this->um = static::$kernel->getContainer()->get('backend.user.manager');
     $this->locales = explode("|", static::$kernel->getContainer()->getParameter('locales'));
     $this->api = array('frontend' => static::$kernel->getContainer()->getParameter('frontend_api'), 'backend' => static::$kernel->getContainer()->getParameter('backend_api'));
     parent::setUp();
 }
 public function setUp()
 {
     // Boot the AppKernel in the test environment and with the debug.
     $this->myKernel = new \AppKernel('test', true);
     $this->myKernel->boot();
     // Store the container and the entity manager in test case properties
     $this->container = $this->myKernel->getContainer();
     $this->entityManager = $this->container->get('doctrine')->getManager();
     $this->tagRepository = $this->container->get('doctrine')->getRepository("AutomationBundle:Tag");
     // Build the schema for sqlite
     //$this->generateSchema();
     parent::setUp();
 }
 public function setUp()
 {
     self::bootKernel();
     $this->application = new Application(static::$kernel);
     $this->application->setAutoExit(false);
     $this->em = static::$kernel->getContainer()->get('doctrine')->getManager();
     $output = new ConsoleOutput();
     $input = new ArrayInput(['command' => 'doctrine:database:drop', '--force' => true]);
     $exitCode = $this->application->run($input, $output);
     $input = new ArrayInput(['command' => 'doctrine:database:create']);
     $exitCode = $this->application->run($input, $output);
     $input = new ArrayInput(['command' => 'doctrine:schema:create']);
     $exitCode = $this->application->run($input, $output);
     $this->assertSame(0, $exitCode);
     parent::setUp();
 }
 public function setUp()
 {
     parent::setUp();
     self::bootKernel();
     $this->client = new Client(['url' => STORAGE_API_URL, "token" => STORAGE_API_TOKEN]);
     $this->doctrine = self::$kernel->getContainer()->get('doctrine');
     $this->clearServers();
     $this->stopTasks();
     try {
         $this->client->dropBucket('in.c-sandbox.test', ['force' => true]);
     } catch (ClientException $e) {
         if ($e->getCode() != 404) {
             throw $e;
         }
     }
     $this->client->createBucket('sandbox', 'in');
 }
 /**
  * {@inheritDoc}
  */
 protected function setUp()
 {
     parent::setUp();
     self::bootKernel();
     $this->serializer = static::$kernel->getContainer()->get('jms_serializer');
 }
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->consumer = $this->createMock(ConsumerInterface::class);
 }
 public function setUp()
 {
     static::$kernel = static::createKernel();
     static::$kernel->boot();
     $this->client = static::createClient([], ['HTTP_HOST' => static::$httpHost]);
     $this->em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager');
     $this->userManager = static::$kernel->getContainer()->get('aisel.user.manager');
     $this->locales = explode("|", static::$kernel->getContainer()->getParameter('locales'));
     $this->websiteEmail = static::$kernel->getContainer()->getParameter('website_email');
     $this->api = array('frontend' => static::$kernel->getContainer()->getParameter('frontend_api'), 'backend' => static::$kernel->getContainer()->getParameter('backend_api'), 'seller' => static::$kernel->getContainer()->getParameter('seller_api'));
     $this->validator = static::$kernel->getContainer()->get('validator');
     $this->faker = Faker\Factory::create();
     parent::setUp();
 }
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     static::bootKernel();
     $this->validator = static::$kernel->getContainer()->get('validator');
 }
 public function setUp()
 {
     static::$kernel = static::createKernel();
     static::$kernel->boot();
     $this->client = static::createClient([], ['HTTP_HOST' => static::$httpHost]);
     $this->dm = static::$kernel->getContainer()->get('doctrine.odm.mongodb.document_manager');
     $this->um = static::$kernel->getContainer()->get('backend.user.manager');
     $this->locales = explode("|", static::$kernel->getContainer()->getParameter('locales'));
     $this->api = array('frontend' => static::$kernel->getContainer()->getParameter('frontend_api'), 'backend' => static::$kernel->getContainer()->getParameter('backend_api'));
     $this->validator = static::$kernel->getContainer()->get('validator');
     $this->faker = Faker\Factory::create();
     parent::setUp();
 }
 protected function setUp()
 {
     parent::setUp();
     $this->bootKernel();
     $this->taskHandlerFactory = self::$kernel->getContainer()->get('task.handler.factory');
 }
 protected function setUp()
 {
     if (!extension_loaded('redis')) {
         $this->markTestSkipped('Redis extension is not loaded');
     }
     parent::setUp();
     static::$kernel = static::createKernel();
     static::$kernel->boot();
     $container = static::$kernel->getContainer();
     /** @var ManagerRegistry $doctrine */
     $doctrine = $container->get('doctrine');
     /** @var EntityManager $em */
     $em = $doctrine->getManager();
     // create database and load schema
     $schemaTool = new SchemaTool($em);
     $schemaTool->dropDatabase();
     $schemaTool->createSchema($em->getMetadataFactory()->getAllMetadata());
     /* @var EntityCache $entityCache */
     $this->cache = $container->get('tree_house_cache.orm.entity_cache');
     $this->cache->clear();
     $this->ormCache = $em->getConfiguration()->getResultCacheImpl();
     $this->entity = new EntityMock(1234);
     $this->entityCacheKey = $this->cache->getEntityKey($this->entity);
     $this->entityCacheClass = $this->cache->getEntityClassKey($this->entity);
     $em->persist($this->entity);
     $em->flush($this->entity);
 }
 protected function setUp()
 {
     parent::setUp();
     $this->bootKernel();
     $this->registry = self::$kernel->getContainer()->get('task.handler_registry');
 }
Beispiel #18
0
 /**
  *
  */
 protected function setUp()
 {
     self::bootKernel();
     $this->router = static::$kernel->getContainer()->get('router');
     parent::setUp();
 }
 public function setUp()
 {
     parent::setUp();
     $setupFactory = new SetupFactory();
     static::$repository = $setupFactory->getRepository();
 }