本文整理汇总了PHP中org\bovigo\vfs\vfsStreamDirectory::chmod方法的典型用法代码示例。如果您正苦于以下问题:PHP vfsStreamDirectory::chmod方法的具体用法?PHP vfsStreamDirectory::chmod怎么用?PHP vfsStreamDirectory::chmod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org\bovigo\vfs\vfsStreamDirectory
的用法示例。
在下文中一共展示了vfsStreamDirectory::chmod方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testShouldThrowExceptionWhenDeletionNotPermitted
/**
* @expectedException RuntimeException
*/
public function testShouldThrowExceptionWhenDeletionNotPermitted()
{
$this->root->chmod(0555);
$this->root->getChild('testfile2')->chmod(0555);
$localDelete = new DefaultDelete($this->root->url() . '/testfile2');
$localDelete->execute();
}
示例2: testDumpToFileThrowsExceptionIfFileDoesNotExistAndTheDirectoryIsNotWritable
/**
* Test dump to file throws exception if file does not exist and the directory is not writable.
*/
public function testDumpToFileThrowsExceptionIfFileDoesNotExistAndTheDirectoryIsNotWritable()
{
$mock = $this->getMockForAbstractClass('SportTrackerConnector\\Workout\\Dumper\\AbstractDumper');
$this->root->chmod(00);
$file = vfsStream::url('root/workout.tst');
$workoutMock = $this->getMock('SportTrackerConnector\\Workout\\Workout');
$this->setExpectedException('InvalidArgumentException', 'Directory for output file "vfs://root/workout.tst" is not writable.');
$mock->dumpToFile($workoutMock, $file);
}
示例3: taskFailsOnWritingFailure
/**
* @test
*/
public function taskFailsOnWritingFailure()
{
$this->dir->chmod(0);
$result = $this->task->run();
$this->assertFalse($result->wasSuccessful());
}