public function testConstructor() { $manager = $this->getMockEntityManager(); $doxport = new Doxport($manager); // Defaults if not injected $this->assertInstanceOf('Doxport\\Metadata\\Driver', $doxport->getMetadataDriver()); $this->assertInstanceOf('Doxport\\File\\Factory', $doxport->getFileFactory()); // Same instance $this->assertEquals($manager, $doxport->getEntityManager()); }
/** * @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; }