Esempio n. 1
0
 /**
  * @param InputInterface $input
  * @return Doxport
  */
 protected function configureDoxport(InputInterface $input)
 {
     $this->doxport = new Doxport($this->getHelper('em')->getEntityManager());
     $this->doxport->setLogger($this->logger);
     $this->doxport->setOption('verbose', $input->getOption('verbose'));
     return $this->doxport;
 }
Esempio n. 2
0
 /**
  * @expectedException Exception
  */
 public function testNoAction()
 {
     $instance = new Doxport($this->getMockEntityManager());
     $instance->setLogger($this->getMockLogger());
     $instance->setEntity('Doxport\\Test\\Fixtures\\Library\\Entities\\Book');
     $instance->setOption('root', true);
     $instance->getConstraintPass();
 }
Esempio n. 3
0
 /**
  * @inheritDoc
  */
 protected function tearDown()
 {
     if ($this->doxport && $this->cleanup) {
         $factory = $this->doxport->getFileFactory();
         $path = $factory->getPath();
         if ($factory->pathExists() && substr($path, 0, strlen(self::$root)) == self::$root) {
             $fs = new Filesystem();
             $fs->remove($path);
         }
     }
     $this->em = null;
     $this->doxport = null;
 }