PhpBench\Tests\Util\Workspace::getWorkspacePath PHP Method

getWorkspacePath() public static method

public static getWorkspacePath ( )
    public static function getWorkspacePath()
    {
        $path = sys_get_temp_dir() . '/phpbench_test_workspace';
        return $path;
    }

Usage Example

Exemplo n.º 1
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());
 }
All Usage Examples Of PhpBench\Tests\Util\Workspace::getWorkspacePath