initWorkspace() public static method

public static initWorkspace ( )
Esempio n. 1
0
 public function setUp()
 {
     Workspace::initWorkspace();
     $this->xmlDecoder = $this->prophesize(XmlDecoder::class);
     $this->iterator = new HistoryIterator($this->xmlDecoder->reveal(), Workspace::getWorkspacePath());
     $this->filesystem = new Filesystem();
 }
Esempio n. 2
0
 public function setUp()
 {
     Workspace::initWorkspace();
     $this->archivePath = Workspace::getWorkspacePath();
     // create some files
     $dom = new Document();
     $dom->createRoot('hello');
     $dom->save($this->archivePath . '/' . '1.xml');
     $dom->save($this->archivePath . '/' . '2.txt');
     $dom->save($this->archivePath . '/' . '2.xml');
     $this->registry = $this->prophesize(Registry::class);
     $this->xmlEncoder = $this->prophesize(XmlEncoder::class);
     $this->xmlDecoder = $this->prophesize(XmlDecoder::class);
     $this->filesystem = $this->prophesize(Filesystem::class);
     $this->archiver = new XmlArchiver($this->registry->reveal(), $this->xmlEncoder->reveal(), $this->xmlDecoder->reveal(), $this->archivePath, $this->filesystem->reveal());
     $this->historyEntry = $this->prophesize(HistoryEntry::class);
     $this->output = new BufferedOutput();
     $this->storage = $this->prophesize(DriverInterface::class);
     $this->document = $this->prophesize(Document::class);
     $this->collection = $this->prophesize(SuiteCollection::class);
     $this->collection2 = $this->prophesize(SuiteCollection::class);
     $this->registry->getService()->willReturn($this->storage->reveal());
 }
Esempio n. 3
0
 /**
  * This method is called in a separate process before the iterations
  * are executed. See the annotations in the header of this class.
  */
 public static function createWorkspace()
 {
     Workspace::initWorkspace();
 }