当前位置: 首页>>代码示例>>PHP>>正文


PHP vfsStreamWrapper::setRoot方法代码示例

本文整理汇总了PHP中org\bovigo\vfs\vfsStreamWrapper::setRoot方法的典型用法代码示例。如果您正苦于以下问题:PHP vfsStreamWrapper::setRoot方法的具体用法?PHP vfsStreamWrapper::setRoot怎么用?PHP vfsStreamWrapper::setRoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org\bovigo\vfs\vfsStreamWrapper的用法示例。


在下文中一共展示了vfsStreamWrapper::setRoot方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 /**
  * Sets up the test fixture.
  *
  * @return void
  */
 public function setUp()
 {
     vfsStreamWrapper::register();
     vfsStreamWrapper::setRoot(new vfsStreamDirectory('test'));
     $this->forum = 'test';
     $this->contents = new Forum_Contents(vfsStream::url('test'));
 }
开发者ID:TN03,项目名称:forum_xh,代码行数:12,代码来源:ContentsTest.php

示例2: setUp

 public function setUp()
 {
     $this->rootDir = new vfsStreamDirectory('queries');
     vfsStreamWrapper::register();
     vfsStreamWrapper::setRoot($this->rootDir);
     $this->loader = new FilesystemQueryLoader($this->rootDir->url());
 }
开发者ID:cocur,项目名称:nqm,代码行数:7,代码来源:FilesystemTest.php

示例3: discard

 /**
  * Discards VFS file system changes
  *
  * @return EcomDev_PHPUnit_Model_Fixture_Vfs
  */
 public function discard()
 {
     if ($this->_currentRoot) {
         StreamWrapper::setRoot(array_pop($this->_currentRoot));
     }
     return $this;
 }
开发者ID:tiagosampaio,项目名称:EcomDev_PHPUnit,代码行数:12,代码来源:Vfs.php

示例4: setUp

 protected function setUp()
 {
     parent::setUp();
     vfsStreamWrapper::register();
     $this->vfs = new vfsStreamDirectory('chunks');
     vfsStreamWrapper::setRoot($this->vfs);
 }
开发者ID:watonyweng,项目名称:flowjs-tour,代码行数:7,代码来源:FustyRequestTest.php

示例5: setUp

 public function setUp()
 {
     vfsStreamWrapper::register();
     vfsStreamWrapper::setRoot(new vfsStreamDirectory('logs'));
     $this->key = 'Logger\\Default';
     $this->factory = new LoggerFactory();
 }
开发者ID:mhilker,项目名称:common,代码行数:7,代码来源:LoggerFactoryTest.php

示例6: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $this->ini = new Ini();
     $this->filename = realpath(__DIR__ . "/../../../data/test.ini");
     vfsStreamWrapper::register();
     vfsStreamWrapper::setRoot(new vfsStreamDirectory('root'));
 }
开发者ID:mceldeen,项目名称:mce,代码行数:11,代码来源:IniTest.php

示例7: testDiscovery

 /**
  * Tests the YAML file discovery.
  */
 public function testDiscovery()
 {
     vfsStreamWrapper::register();
     $root = new vfsStreamDirectory('modules');
     vfsStreamWrapper::setRoot($root);
     $url = vfsStream::url('modules');
     mkdir($url . '/test_1');
     file_put_contents($url . '/test_1/test_1.test.yml', 'name: test');
     file_put_contents($url . '/test_1/test_2.test.yml', 'name: test');
     mkdir($url . '/test_2');
     file_put_contents($url . '/test_2/test_3.test.yml', 'name: test');
     // Write an empty YAML file.
     file_put_contents($url . '/test_2/test_4.test.yml', '');
     // Set up the directories to search.
     $directories = array('test_1' => $url . '/test_1', 'test_2' => $url . '/test_1', 'test_3' => $url . '/test_2', 'test_4' => $url . '/test_2');
     $discovery = new YamlDiscovery('test', $directories);
     $data = $discovery->findAll();
     $this->assertEquals(count($data), count($directories));
     $this->assertArrayHasKey('test_1', $data);
     $this->assertArrayHasKey('test_2', $data);
     $this->assertArrayHasKey('test_3', $data);
     $this->assertArrayHasKey('test_4', $data);
     foreach (array('test_1', 'test_2', 'test_3') as $key) {
         $this->assertArrayHasKey('name', $data[$key]);
         $this->assertEquals($data[$key]['name'], 'test');
     }
     $this->assertSame(array(), $data['test_4']);
 }
开发者ID:aWEBoLabs,项目名称:taxi,代码行数:31,代码来源:YamlDiscoveryTest.php

示例8: setFileSystem

 protected function setFileSystem()
 {
     vfsStreamWrapper::register();
     $root = vfsStream::newDirectory('build');
     vfsStreamWrapper::setRoot($root);
     return $root;
 }
开发者ID:ausger,项目名称:satis,代码行数:7,代码来源:WebBuilderDumpTest.php

示例9: testCacheWSDLIsWorldWritable

 public function testCacheWSDLIsWorldWritable()
 {
     vfsStreamWrapper::register();
     vfsStreamWrapper::setRoot(new vfsStreamDirectory('tmp'));
     $SOAP = $this->getMock('SSRS\\Soap\\NTLM', array('setCacheWSDLPermission'), array('http://'));
     $SOAP->expects($this->once())->method('setCacheWSDLPermission')->with($this->equalTo(0666));
     $SOAP->setCachePath(vfsStream::url('tmp/file.wsdl'))->cacheWSDL('$fileContents');
 }
开发者ID:caseypage,项目名称:php-ssrs-1,代码行数:8,代码来源:NTLMTest.php

示例10: initSchemaManager

 /**
  * PHPUnit cannot add this to code coverage
  *
  * @codeCoverageIgnore
  *
  * @param $swaggerPath
  *
  * @throws \org\bovigo\vfs\vfsStreamException
  */
 public static function initSchemaManager($swaggerPath)
 {
     vfsStreamWrapper::register();
     vfsStreamWrapper::setRoot(new vfsStreamDirectory('root'));
     file_put_contents(vfsStream::url('root') . '/swagger.json', json_encode(Yaml::parse(file_get_contents($swaggerPath))));
     self::$schemaManager = new SchemaManager(vfsStream::url('root') . '/swagger.json');
     self::$document = new SwaggerDocument($swaggerPath);
 }
开发者ID:krizon,项目名称:swagger-bundle,代码行数:17,代码来源:ApiTestCase.php

示例11: setUp

 public function setUp()
 {
     $this->buildDir = new vfsStreamDirectory('build');
     vfsStreamWrapper::register();
     vfsStreamWrapper::setRoot($this->buildDir);
     $this->filesystem = m::mock('Symfony\\Component\\Filesystem\\Filesystem');
     $this->application = new Application($this->getMockKernel());
 }
开发者ID:braincrafted,项目名称:static-site-bundle,代码行数:8,代码来源:BuildCommandTest.php

示例12: setUp

 public function setUp()
 {
     vfsStreamWrapper::register();
     $root = new vfsStreamDirectory('root');
     vfsStreamWrapper::setRoot($root);
     vfsStream::copyFromFileSystem(__DIR__ . '/../package');
     $this->config = ['version' => '1.0.4', 'configFile' => vfsStream::url('root/app/code/community/Slovenian/LocalePackSl/etc/config.xml'), 'packageFile' => vfsStream::url('root/package.xml')];
 }
开发者ID:symfony-si,项目名称:magento1-sl-si,代码行数:8,代码来源:PackageTest.php

示例13: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $this->csv = new Csv();
     $this->largeCsv = realpath(__DIR__ . "/../../../data/Large.csv");
     $this->smallCsv = realpath(__DIR__ . "/../../../data/Small.csv");
     vfsStreamWrapper::register();
     vfsStreamWrapper::setRoot(new vfsStreamDirectory('root'));
 }
开发者ID:mceldeen,项目名称:mce,代码行数:12,代码来源:CsvTest.php

示例14: setUp

 protected function setUp()
 {
     $this->root = new vfsStreamDirectory('test');
     vfsStreamWrapper::register();
     vfsStreamWrapper::setRoot($this->root);
     $this->responder = new StaticHtmlFileResponder($this->root->url(), 'file');
     $this->response = new Response();
 }
开发者ID:bitexpert,项目名称:adrenaline,代码行数:8,代码来源:StaticHtmlFileResponderUnitTest.php

示例15: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $this->object = new NlReader();
     vfsStreamWrapper::register();
     $root = vfsStream::newDirectory('tmp');
     vfsStreamWrapper::setRoot($root);
     $this->file = vfsStream::newFile('items.csv', 0764)->withContent("73-ou-XW46\nApple\n1\na")->at($root);
 }
开发者ID:aonamrata,项目名称:FileParser,代码行数:12,代码来源:NlReaderTest.php


注:本文中的org\bovigo\vfs\vfsStreamWrapper::setRoot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。