PhpBench\Tests\Unit\Storage\Archiver\XmlArchiverTest::setUp PHP Method

setUp() public method

public setUp ( )
    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());
    }