コード例 #1
0
 /**
  * @param User   $user
  * @param Collection $collection
  * @return $this
  */
 public function init(User $user, $collection)
 {
     $this->user = $user;
     $this->collection = $collection;
     $this->exportManager = $this->exportManager->init($this->user)->setCollection($this->collection);
     return $this;
 }
コード例 #2
0
 public function beforeTestMethod($method)
 {
     $this->kernel = new \AppKernel('test', true);
     $this->kernel->boot();
     // Store the container and the entity manager in test case properties
     $this->container = $this->kernel->getContainer();
     $managerRegistry = $this->container->get('doctrine');
     $this->exportManager = new \AppBundle\Manager\ExportManager($managerRegistry, $this->container->get('session'), $this->container->get('genericentitymanager'), $this->container->getParameter('maxitemperpage')[1], $this->container->get('diff.computer'), $this->container->getParameter('user_group'));
     $user = new User('tpateffoz', $this->container->getParameter('api_recolnat_base_uri'), $this->container->getParameter('api_recolnat_user_path'), $this->container->getParameter('user_group'));
     $user->setExportPath($this->container->getParameter('export_path'));
     $collection = $this->container->get('utility')->getCollection('MHNAIX', 'AIX');
     $this->exportManager->init($user)->setCollection($collection);
 }