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


PHP vfsStream::umask方法代码示例

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


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

示例1: setUp

 /**
  * Sets up the required fixtures.
  */
 public function setUp()
 {
     $mockConfig = ['ClassContent' => [], 'Config' => ['bootstrap.yml' => file_get_contents(__DIR__ . '/Config/bootstrap.yml'), 'bundles.yml' => file_get_contents(__DIR__ . '/Config/bundles.yml'), 'config.yml' => file_get_contents(__DIR__ . '/Config/config.yml'), 'doctrine.yml' => file_get_contents(__DIR__ . '/Config/doctrine.yml'), 'logging.yml' => file_get_contents(__DIR__ . '/Config/logging.yml'), 'security.yml' => file_get_contents(__DIR__ . '/Config/security.yml'), 'services.yml' => file_get_contents(__DIR__ . '/Config/services.yml')], 'Ressources' => [], 'cache' => ['Proxies' => [], 'twig' => []]];
     vfsStream::umask(00);
     vfsStream::setup('repositorydir', 0777, $mockConfig);
     $mockApp = new MockBBApplication(null, null, false, $mockConfig, __DIR__ . '/../vendor');
     $this->bundle = $mockApp->getBundle('theme');
 }
开发者ID:backbee,项目名称:theme-bundle,代码行数:11,代码来源:ThemeTestCase.php

示例2: testExecute

    /**
     * @covers ::execute
     */
    public function testExecute()
    {
        // mock the Kernel or create one depending on your needs
        $application = new Console(self::$app);
        $application->add(new AclLoadCommand());
        $command = $application->find('acl:load');
        $commandTester = new CommandTester($command);
        vfsStream::umask(00);
        $this->_mock_basedir = vfsStream::setup('test_dir', 0777, array('file.yml' => '
groups:
  super_admin:
    sites:
      resources: all
      actions: all
            '));
        $commandTester->execute(array('command' => $command->getName(), 'file' => 'vfs://test_dir/file.yml'));
        $this->assertContains('Processing file: vfs://test_dir/file.yml', $commandTester->getDisplay());
    }
开发者ID:mickaelsteinberg,项目名称:BackBee,代码行数:21,代码来源:AclLoadCommandTest.php

示例3: testOnApplicationInitRaisesContainerDirectoryNotWritableException

 public function testOnApplicationInitRaisesContainerDirectoryNotWritableException()
 {
     $basic_services_yml = array('parameters' => array('bbapp.logger.class' => 'BackBee\\Logging\\Logger', 'bbapp.logger_debug.class' => 'BackBee\\Logging\\DebugStackLogger'));
     $bootstrap_yml = array('debug' => false, 'container' => array('dump_directory' => 'vfs://no_rights_base_directory/container', 'autogenerate' => true));
     $resources_directory = realpath(__DIR__ . '/../ContainerBuilderTest_Ressources/');
     $virtual_structure = array('backbee' => array('Config' => array('services' => array('services.yml' => \Symfony\Component\Yaml\Yaml::dump($basic_services_yml)))), 'repository' => array('Config' => array('bootstrap.yml' => \Symfony\Component\Yaml\Yaml::dump($bootstrap_yml))), 'container' => array());
     vfsStream::umask(0222);
     vfsStream::setup('cant_write_base_directory', 0777, $virtual_structure);
     $application = $this->generateManualBBApplication(vfsStream::url('cant_write_base_directory'));
     $application->setContainer((new ContainerBuilder($application))->getContainer());
     $container = $application->getContainer();
     $application->setDebug_Mode(false);
     $container->setParameter('container.dump_directory', $application->getBaseDir() . '/container');
     $this->assertFalse($container->isFrozen());
     $event = new Event($application);
     try {
         ContainerListener::onApplicationInit($event);
         $this->fail('Raise of ContainerDirectoryNotWritableException expected.');
     } catch (\Exception $e) {
         $this->assertInstanceOf('BackBee\\DependencyInjection\\Exception\\ContainerDirectoryNotWritableException', $e);
     }
 }
开发者ID:gobjila,项目名称:BackBee,代码行数:22,代码来源:ContainerListenerTest.php

示例4: createFilesystem

 protected function createFilesystem()
 {
     vfsStream::umask(00);
     $filesystem = vfsStream::setup('tmp', null, ['upload' => ['test.txt' => 'Lorem ipsum dolor sit amet']]);
     return $filesystem;
 }
开发者ID:novuso,项目名称:NovusoCommonBundle,代码行数:6,代码来源:ActionTest.php

示例5: resetStructure

 public function resetStructure()
 {
     if (null !== $this->mockedStructure) {
         vfsStream::umask(00);
         vfsStream::setup('repositorydir', 0777, $this->mockedStructure);
     }
 }
开发者ID:gobjila,项目名称:BackBee,代码行数:7,代码来源:MockBBApplication.php

示例6: createVfs

 /**
  * Creates a virtual file system
  *
  * @param array  $structure A nested array keyed by folder or filename;
  *                           array values for sub-directories
  * @param string $baseDir   The name of the base directory
  * @param int    $umask     Umask setting for the virtual file system
  *
  * @return vfsStreamDirectory
  */
 protected function createVfs(array $structure, $baseDir = 'root', $umask = 022)
 {
     vfsStream::umask($umask);
     return vfsStream::setup($baseDir, null, $structure);
 }
开发者ID:novuso,项目名称:system,代码行数:15,代码来源:VirtualFileSystem.php


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