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


PHP vfsStreamWrapper::register方法代码示例

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


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

示例1: setFileSystem

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

示例2: 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

示例3: 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

示例4: setUp

 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->fileHandler = new FileHandlerPhp();
     vfsStreamWrapper::register();
     try {
         $testPath = $this->getTestPath();
         // Remove the files
         foreach ($this->resourcesToRemove as $path) {
             $fullPath = $testPath . $path;
             if (is_file($fullPath)) {
                 unlink($fullPath);
             }
         }
         // Remove the directories
         foreach ($this->resourcesToRemove as $path) {
             $fullPath = $testPath . $path;
             if (is_dir($fullPath)) {
                 rmdir($fullPath);
             }
         }
     } catch (\PHPUnit_Framework_SkippedTestError $e) {
     } catch (\PHPUnit_Framework_AssertionFailedError $e) {
     }
 }
开发者ID:szeber,项目名称:yapep_base,代码行数:31,代码来源:FileHandlerPhpTest.php

示例5: setUp

 public function setUp()
 {
     vfsStreamWrapper::register();
     $root = vfsStream::setup('logs');
     $mockFile = vfsStream::newFile('logging_helper.log')->at($root);
     $root->addChild($mockFile);
 }
开发者ID:edgarsandi,项目名称:logging-helper,代码行数:7,代码来源:FactoryTest.php

示例6: 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

示例7: setUp

 public function setUp()
 {
     $this->controllerCollection = \Mockery::mock("Silex\\ContainerCollection");
     $this->app = \Mockery::mock("Silex\\Application");
     $this->securityContainer = \Mockery::mock("Silktide\\LazyBoy\\Security\\SecurityContainer");
     vfsStreamWrapper::register();
 }
开发者ID:silktide,项目名称:lazy-boy,代码行数:7,代码来源:RouteLoaderTest.php

示例8: setUp

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

示例9: 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

示例10: getPartialPathAndFilenameThrowsExceptionIfPartialFileIsADirectory

 /**
  * @test
  * @expectedException \Neos\FluidAdaptor\View\Exception\InvalidTemplateResourceException
  */
 public function getPartialPathAndFilenameThrowsExceptionIfPartialFileIsADirectory()
 {
     vfsStreamWrapper::register();
     mkdir('vfs://MyPartials/NotAFile');
     $this->standaloneView->setPartialRootPath('vfs://MyPartials');
     $this->standaloneView->getTemplatePaths()->getPartialSource('NotAFile');
 }
开发者ID:neos,项目名称:flow-development-collection,代码行数:11,代码来源:StandaloneViewTest.php

示例11: 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

示例12: 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

示例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->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

示例14: setUp

 /**
  * Sets up this testcase
  *
  * @return void
  */
 protected function setUp()
 {
     if (!class_exists('org\\bovigo\\vfs\\vfsStreamWrapper')) {
         $this->markTestSkipped('File backend tests are not available with this phpunit version.');
     }
     vfsStreamWrapper::register();
     vfsStreamWrapper::setRoot(new vfsStreamDirectory('Foo'));
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:13,代码来源:FileBackendTest.php

示例15: tearDownCacheDir

 public function tearDownCacheDir()
 {
     vfsStreamWrapper::register();
     $cacheDir = vfsStream::url('zf2-module-test');
     if (is_dir($cacheDir)) {
         static::rmdir($cacheDir);
     }
 }
开发者ID:pnaq57,项目名称:zf2demo,代码行数:8,代码来源:AbstractControllerTestCaseTest.php


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